From 90eed1addeb6e4c032b36396417547963d61a17a Mon Sep 17 00:00:00 2001 From: YanceyOfficial Date: Tue, 9 Nov 2021 16:59:24 +0800 Subject: [PATCH] feat: add globalFix --- src/graphql/graphqls.module.ts | 1 + src/main.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/graphql/graphqls.module.ts b/src/graphql/graphqls.module.ts index 6bb326c6..ff7cab3f 100644 --- a/src/graphql/graphqls.module.ts +++ b/src/graphql/graphqls.module.ts @@ -15,6 +15,7 @@ import { configCORS } from '../shared/utils' debug: !configService.isEnvProduction, playground: !configService.isEnvProduction, installSubscriptionHandlers: true, + useGlobalPrefix: true, typePaths: ['./**/*.gql'], autoSchemaFile: SCHEMA_GQL_FILE_NAME, context: ({ req }) => ({ req }), diff --git a/src/main.ts b/src/main.ts index 324be9d4..0fd4c756 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,6 +6,7 @@ import { AppModule } from './app.module' const bootstrap = async () => { const app = await NestFactory.create(AppModule) + app.setGlobalPrefix('beg') configMiddlewares(app) configLog(app)