Browse Source

fix(core): Disable graphql playground according to apiOptions setting

Fixes #2246
Michael Bromley 2 years ago
parent
commit
b9a0200017
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/core/src/api/config/configure-graphql-module.ts

+ 1 - 1
packages/core/src/api/config/configure-graphql-module.ts

@@ -116,7 +116,7 @@ async function createGraphQLOptions(
             new IdCodecPlugin(idCodecService),
             new TranslateErrorsPlugin(i18nService),
             new AssetInterceptorPlugin(configService),
-            ApolloServerPluginLandingPageGraphQLPlayground(),
+            ...(options.playground ? [ApolloServerPluginLandingPageGraphQLPlayground()] : []),
             ...configService.apiOptions.apolloServerPlugins,
         ],
         validationRules: options.validationRules,