mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-04 11:54:10 +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,
 | 
			
		||||
        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);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user