Refactor code structure and dependencies
This commit is contained in:
@@ -6,14 +6,17 @@ import { PrismaService } from '../prisma/prisma.service';
|
||||
import type PrismaTypes from '../types/pothos.generated';
|
||||
import { getDatamodel } from '../types/pothos.generated';
|
||||
|
||||
export const prisma = new PrismaService({});
|
||||
export const prisma = new PrismaService({
|
||||
log: ['query', 'info', 'warn', 'error'],
|
||||
errorFormat: 'pretty',
|
||||
});
|
||||
export const builder = new SchemaBuilder<{
|
||||
Scalars: {
|
||||
DateTime: {
|
||||
Input: Date;
|
||||
Output: Date;
|
||||
};
|
||||
Scalars: {
|
||||
DateTime: {
|
||||
Input: Date;
|
||||
Output: Date;
|
||||
};
|
||||
};
|
||||
PrismaTypes: PrismaTypes;
|
||||
}>({
|
||||
plugins: [PrismaPlugin, PrismaUtils],
|
||||
@@ -25,4 +28,5 @@ export const builder = new SchemaBuilder<{
|
||||
dmmf: getDatamodel(),
|
||||
},
|
||||
});
|
||||
|
||||
builder.addScalarType('DateTime', DateTimeResolver, {});
|
||||
|
||||
Reference in New Issue
Block a user