push code ne
This commit is contained in:
@@ -55,6 +55,10 @@ export interface SchemaBuilderOption {
|
||||
Input: FileUpload;
|
||||
Output: FileUpload;
|
||||
};
|
||||
Int: {
|
||||
Input: number;
|
||||
Output: number | bigint | string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Int } from '@nestjs/graphql';
|
||||
|
||||
import {
|
||||
type BaseEnum,
|
||||
@@ -33,7 +34,6 @@ const scalarListOps = [
|
||||
] as const;
|
||||
const JsonFilterOps = ['equals', 'in', 'notIn', 'not'] as const;
|
||||
const EnumFilterOps = ['equals', 'not'] as const;
|
||||
|
||||
@Injectable()
|
||||
export class PrismaCrudGenerator<Types extends SchemaTypes> {
|
||||
private refCache = new Map<
|
||||
@@ -67,6 +67,8 @@ export class PrismaCrudGenerator<Types extends SchemaTypes> {
|
||||
take: t.field({
|
||||
type: 'Int',
|
||||
required: false,
|
||||
// @ts-expect-error: Int is not a valid default value
|
||||
defaultValue: 10,
|
||||
}),
|
||||
skip: t.field({
|
||||
type: 'Int',
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Global, Logger, MiddlewareConsumer, Module } from '@nestjs/common';
|
||||
|
||||
import { AdminNoteModule } from '../AdminNote/adminnote.module';
|
||||
import { ApolloDriverConfig } from '@nestjs/apollo';
|
||||
import { Builder } from './graphql.builder';
|
||||
import { CategoryModule } from '../Category/category.module';
|
||||
import { CenterMentorModule } from '../CenterMentor/centermentor.module';
|
||||
import { CenterModule } from '../Center/center.module';
|
||||
import { CenterStaffModule } from '../CenterStaff/centerstaff.module';
|
||||
import { ChatroomModule } from '../ChatRoom/chatroom.module';
|
||||
import { CommonModule } from '../common/common.module';
|
||||
import { GraphQLModule } from '@nestjs/graphql';
|
||||
@@ -45,7 +46,7 @@ import { initContextCache } from '@pothos/core';
|
||||
CenterModule,
|
||||
ServiceModule,
|
||||
ChatroomModule,
|
||||
CenterStaffModule,
|
||||
CenterMentorModule,
|
||||
ResumeModule,
|
||||
WorkshopModule,
|
||||
WorkshopOrganizationModule,
|
||||
@@ -63,6 +64,7 @@ import { initContextCache } from '@pothos/core';
|
||||
UploadedFileModule,
|
||||
ManagedServiceModule,
|
||||
WorkshopMeetingRoomModule,
|
||||
AdminNoteModule,
|
||||
PothosModule.forRoot({
|
||||
builder: {
|
||||
inject: [PrismaService],
|
||||
|
||||
Reference in New Issue
Block a user