From d23de9407c5d76ba11c4c56450ef438063d789a2 Mon Sep 17 00:00:00 2001 From: zhangtao25 Date: Fri, 15 Nov 2024 11:24:45 +0800 Subject: [PATCH] chore: repo overall update --- packages/canyon-collect/src/app.module.ts | 10 +++----- packages/canyon-collect/src/app.resolver.ts | 26 --------------------- 2 files changed, 3 insertions(+), 33 deletions(-) delete mode 100644 packages/canyon-collect/src/app.resolver.ts diff --git a/packages/canyon-collect/src/app.module.ts b/packages/canyon-collect/src/app.module.ts index 24a41941..51c00f73 100644 --- a/packages/canyon-collect/src/app.module.ts +++ b/packages/canyon-collect/src/app.module.ts @@ -5,10 +5,10 @@ import { PrismaModule } from './prisma/prisma.module'; import { CollectModule } from './apps/collect/collect.module'; import { join } from 'path'; import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo'; -import { GraphQLModule } from '@nestjs/graphql'; +// import { GraphQLModule } from '@nestjs/graphql'; import { ServeStaticModule } from '@nestjs/serve-static'; import { ProjectModule } from './apps/project/project.module'; -import { AppResolver } from './app.resolver'; +// import { AppResolver } from './app.resolver'; import { CovModule } from './apps/cov/cov.module'; // mode:collect、frontAndBack @@ -31,12 +31,8 @@ importModules.push(...frontAndBackModules); rootPath: join(__dirname, '..', 'public'), exclude: ['/graphql/(.*)'], }), - GraphQLModule.forRoot({ - autoSchemaFile: 'schema.gql', - driver: ApolloDriver, - }), ], controllers: [AppController], - providers: [AppService, AppResolver], + providers: [AppService], }) export class AppModule {} diff --git a/packages/canyon-collect/src/app.resolver.ts b/packages/canyon-collect/src/app.resolver.ts deleted file mode 100644 index 1bbfd91b..00000000 --- a/packages/canyon-collect/src/app.resolver.ts +++ /dev/null @@ -1,26 +0,0 @@ -import {Field, ObjectType, Query, Resolver} from "@nestjs/graphql"; -// import {BuOption} from "./project.model"; -// import {ProjectService} from "./services/project.service"; - -@ObjectType() -class CheckGraphqlModel { - @Field(() => Number) - status: 1; -} - -@Resolver(() => "App") -export class AppResolver { - constructor( - // private readonly projectService: ProjectService, - ) {} - - - @Query(() => CheckGraphqlModel, { - description: "检查graphql", - }) - async checkGraphql(): Promise { - return { - status: 1, - } - } -}