mirror of
https://github.com/strapi/strapi.git
synced 2025-11-11 07:39:16 +00:00
Updated ApolloServer configuration for introspection queries (#4660)
This commit is contained in:
parent
8e2a4cd1bf
commit
52f5770b06
@ -83,6 +83,11 @@ module.exports = strapi => {
|
|||||||
playground: false,
|
playground: false,
|
||||||
cors: false,
|
cors: false,
|
||||||
bodyParserConfig: true,
|
bodyParserConfig: true,
|
||||||
|
introspection: _.get(
|
||||||
|
strapi.plugins.graphql,
|
||||||
|
'config.introspection',
|
||||||
|
true
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Disable GraphQL Playground in production environment.
|
// Disable GraphQL Playground in production environment.
|
||||||
@ -92,10 +97,8 @@ module.exports = strapi => {
|
|||||||
) {
|
) {
|
||||||
serverParams.playground = {
|
serverParams.playground = {
|
||||||
endpoint: strapi.plugins.graphql.config.endpoint,
|
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);
|
const server = new ApolloServer(serverParams);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user