diff --git a/packages/strapi-plugin-graphql/hooks/graphql/index.js b/packages/strapi-plugin-graphql/hooks/graphql/index.js index 998a3e53a6..63b15d65ce 100644 --- a/packages/strapi-plugin-graphql/hooks/graphql/index.js +++ b/packages/strapi-plugin-graphql/hooks/graphql/index.js @@ -83,6 +83,11 @@ module.exports = strapi => { playground: false, cors: false, bodyParserConfig: true, + introspection: _.get( + strapi.plugins.graphql, + 'config.introspection', + true + ), }; // Disable GraphQL Playground in production environment. @@ -92,10 +97,8 @@ module.exports = strapi => { ) { serverParams.playground = { endpoint: strapi.plugins.graphql.config.endpoint, - shareEnabled: strapi.plugins.graphql.config.shareEnabled + shareEnabled: strapi.plugins.graphql.config.shareEnabled, }; - - serverParams.introspection = true; } const server = new ApolloServer(serverParams);