Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
feat: use Apollo Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
YanceyOfficial committed Sep 23, 2021
1 parent 3cf5c6c commit 06049a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@nestjs/mongoose": "^8.0.1",
"@nestjs/passport": "^8.0.1",
"@nestjs/platform-express": "^8.0.6",
"apollo-server-core": "^3.3.0",
"apollo-server-express": "^3.3.0",
"bcrypt": "^5.0.1",
"class-transformer": "^0.4.0",
Expand Down
6 changes: 5 additions & 1 deletion src/graphql/graphqls.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Module } from '@nestjs/common'
import { GraphQLModule } from '@nestjs/graphql'
import { ValidationError } from 'apollo-server-express'
import { ApolloServerPluginLandingPageLocalDefault } from 'apollo-server-core'
import { ConfigModule } from '../config/config.module'
import { ConfigService } from '../config/config.service'
import { SCHEMA_GQL_FILE_NAME } from '../shared/constants'
Expand All @@ -12,7 +13,7 @@ import { SCHEMA_GQL_FILE_NAME } from '../shared/constants'

useFactory: async (configService: ConfigService) => ({
debug: !configService.isEnvProduction,
playground: !configService.isEnvProduction,
playground: false,
installSubscriptionHandlers: true,
typePaths: ['./**/*.gql'],
autoSchemaFile: SCHEMA_GQL_FILE_NAME,
Expand All @@ -34,6 +35,9 @@ import { SCHEMA_GQL_FILE_NAME } from '../shared/constants'
}
: error
},
plugins: [
!configService.isEnvProduction && ApolloServerPluginLandingPageLocalDefault(),
].filter(Boolean),
}),

inject: [ConfigService],
Expand Down

0 comments on commit 06049a7

Please sign in to comment.