Skip to content

Commit

Permalink
chore: update PrismaService shutdown hooks (#484)
Browse files Browse the repository at this point in the history
* chore: update prisma-related dependencies

* chore: remove PrismaService shutdown hooks
  • Loading branch information
ruheni committed Jul 20, 2023
1 parent 17ccc29 commit b6c700c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 40 deletions.
65 changes: 32 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
"dependencies": {
"@apollo/server": "^4.5.0",
"@devoxa/prisma-relay-cursor-connection": "2.2.2",
"@devoxa/prisma-relay-cursor-connection": "2.2.3",
"@nestjs/apollo": "11.0.3",
"@nestjs/common": "9.3.10",
"@nestjs/config": "2.3.1",
Expand All @@ -63,14 +63,14 @@
"@nestjs/passport": "9.0.3",
"@nestjs/platform-express": "9.3.10",
"@nestjs/swagger": "6.2.1",
"@prisma/client": "^4.11.0",
"@prisma/client": "^5.0.0",
"bcrypt": "5.1.0",
"class-transformer": "0.5.1",
"class-validator": "0.13.2",
"graphql": "16.6.0",
"graphql-scalars": "1.20.1",
"graphql-subscriptions": "2.0.0",
"nestjs-prisma": "0.20.0",
"nestjs-prisma": "0.22.0-dev.0",
"passport": "0.6.0",
"passport-jwt": "4.0.1",
"reflect-metadata": "0.1.13",
Expand All @@ -95,7 +95,7 @@
"eslint-plugin-prettier": "4.2.1",
"jest": "29.5.0",
"prettier": "2.8.4",
"prisma": "4.11.0",
"prisma": "5.0.0",
"prisma-dbml-generator": "0.10.0-dev.0",
"supertest": "6.3.3",
"ts-jest": "29.0.5",
Expand Down
5 changes: 2 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ValidationPipe } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { HttpAdapterHost, NestFactory } from '@nestjs/core';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import { PrismaClientExceptionFilter, PrismaService } from 'nestjs-prisma';
import { PrismaClientExceptionFilter } from 'nestjs-prisma';
import { AppModule } from './app.module';
import type {
CorsConfig,
Expand All @@ -17,8 +17,7 @@ async function bootstrap() {
app.useGlobalPipes(new ValidationPipe());

// enable shutdown hook
const prismaService: PrismaService = app.get(PrismaService);
await prismaService.enableShutdownHooks(app);
app.enableShutdownHooks();

// Prisma Client Exception Filter for unhandled exceptions
const { httpAdapter } = app.get(HttpAdapterHost);
Expand Down

0 comments on commit b6c700c

Please sign in to comment.