This repository has been archived by the owner on Dec 4, 2023. It is now read-only.
-
Hi I got a type error when use with nestjs: @Injectable()
export class PrismaService extends PrismaClient implements OnModuleInit {
constructor(@InjectRedis() private readonly redis: Redis) {
super()
}
async onModuleInit() {
// optional and better for performance, because of prisma client lazy connect behavior
// await this.$connect()
this.$use(
createPrismaRedisCache({
models:[{
model: 'User',
}],
}),
);
}
async enableShutdownHooks(app: INestApplication) {
this.$on('beforeExit', async () => {
await app.close()
})
}
} |
Beta Was this translation helpful? Give feedback.
Answered by
Asjas
Apr 19, 2022
Replies: 1 comment
-
Hey @lodisy Can you try the 3.2.0 release that I just published? I updated the |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Asjas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @lodisy
Can you try the 3.2.0 release that I just published?
I updated the
Middleware
type to useany
instead ofResult
. 🙂