Easy Prisma support for your NestJS application
Full Changelog: https://github.com/notiz-dev/nestjs-prisma/compare/v0.22.0...v0.23.0
Full Changelog: https://github.com/notiz-dev/nestjs-prisma/compare/v0.22.0...v0.23.0-dev.0
enableShutdownHooks
as it is no longer needed (not needed since Prisma v3 - https://github.com/nestjs/docs.nestjs.com/pull/2797)Remove enableShutdownHooks
from your main.ts
// main.ts
- const prismaService: PrismaService = app.get(PrismaService);
- await prismaService.enableShutdownHooks(app);
enableShutdownHooks
as it is no longer needed (not needed since Prisma v3 - https://github.com/nestjs/docs.nestjs.com/pull/2797)Remove enableShutdownHooks
from your main.ts
// main.ts
- const prismaService: PrismaService = app.get(PrismaService);
- await prismaService.enableShutdownHooks(app);
providePrismaClientExceptionFilter
, improve exception filter docsThis removes enableShutdownHooks
from CustomPrismaService
as this is not available after PrismaClient $extends
. If you want to use $on
do it in this order
const prisma = new PrismaClient()
.$on(/* ... */)
.$extends({/* ... */})
Prisma.NotFoundError
as it is replaced by Prisma.PrismaClientKnownRequestError
This removes enableShutdownHooks
from CustomPrismaService
as this is not available after PrismaClient $extends
. If you want to use $on
do it in this order
const prisma = new PrismaClient()
.$on(/* ... */)
.$extends({/* ... */})