Fix graphql Queries (#142)

This commit is contained in:
Charles Bochet
2023-05-26 08:33:33 +02:00
committed by GitHub
parent 17f5cf1766
commit 112aa3720b
19 changed files with 93 additions and 102 deletions

View File

@ -0,0 +1,15 @@
import { INestApplication, Injectable, OnModuleInit } from '@nestjs/common';
import { PrismaClient } from '@prisma/client';
@Injectable()
export class PrismaService extends PrismaClient implements OnModuleInit {
async onModuleInit() {
await this.$connect();
}
async enableShutdownHooks(app: INestApplication) {
this.$on('beforeExit', async () => {
await app.close();
});
}
}