diff --git a/src/Graphql/graphql.module.ts b/src/Graphql/graphql.module.ts index e7b2ee0..4b1e3a5 100644 --- a/src/Graphql/graphql.module.ts +++ b/src/Graphql/graphql.module.ts @@ -1,5 +1,6 @@ import { Global, Logger, Module } from '@nestjs/common' +import { ApolloServerPluginLandingPageLocalDefault } from '@apollo/server/plugin/landingPage/default' import { ApolloDriverConfig } from '@nestjs/apollo' import { ConfigModule } from '@nestjs/config' import { GraphQLModule } from '@nestjs/graphql' @@ -47,7 +48,6 @@ import { CommonModule } from '../common/common.module' import { Builder } from './graphql.builder' import { PrismaCrudGenerator } from './graphql.generator' import { GraphqlService } from './graphql.service' - @Global() @Module({ imports: [ @@ -98,7 +98,7 @@ import { GraphqlService } from './graphql.service' useFactory: async (graphqlService: GraphqlService, pubsub: RedisPubSub) => ({ path: process.env.API_PATH + '/graphql', debug: process.env.NODE_ENV === 'development' || false, - playground: process.env.NODE_ENV === 'development' || false, + playground: false, introspection: process.env.NODE_ENV === 'development' || false, logger: { debug: (...args) => Logger.debug(...args, 'GraphqlModule'), @@ -106,6 +106,7 @@ import { GraphqlService } from './graphql.service' warn: (...args) => Logger.warn(...args, 'GraphqlModule'), error: (...args) => Logger.error(...args, 'GraphqlModule'), }, + plugins: [ApolloServerPluginLandingPageLocalDefault()], installSubscriptionHandlers: true, subscriptions: { 'graphql-ws': {