我正在尝试按照此官方指南和本教程来设置Redis caching我的nestjs项目。我正在按照提到的确切步骤进行操作,但出现此错误graphqlProperty 'get' does not exist on type 'Cache'.
这是确切的代码
import {User} from './user.entity'
import {Resolver, Query, ResolveField, Args, Parent, Mutation} from '@nestjs/graphql'
import { UsersService } from './users.service';
import { PostsService } from '../posts/posts.service';
import { CurrentUser } from 'src/auth/auth.resolver';
import { CACHE_MANAGER, Inject, UseGuards } from '@nestjs/common';
import { GqlAuthGuard } from 'src/auth/graphql-auth.guard';
import { Cache } from 'cache-manager'; <---------this is you need to import
@Resolver(of => User) …Run Code Online (Sandbox Code Playgroud)