This repository was archived by the owner on Dec 19, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +20
-4
lines changed
example-graphql-tools/src/main/resources
graphql-spring-boot-autoconfigure/src/main
java/com/oembedler/moon/graphql/boot Expand file tree Collapse file tree 5 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,9 @@ Available Spring Boot configuration parameters (either `application.yml` or `app
167167graphql:
168168 tools:
169169 schemaLocationPattern: "**/*.graphqls"
170+ # Enable or disable the introspection query. Disabling it puts your server in contravention of the GraphQL
171+ # specification and expectations of most clients, so use this option with caution
172+ introspectionEnabled: true
170173` ` `
171174By default GraphQL tools uses the location pattern `**/*.graphqls` to scan for GraphQL schemas on the classpath.
172175Use the `schemaLocationPattern` property to customize this pattern.
Original file line number Diff line number Diff line change 33 name : graphql-java-tools-app
44server :
55 port : 9000
6- servlet :
7- context-path : /abc
86graphiql :
97 headers :
108 Authorization : " Bearer 05bd9a5f3fe0408f89520946b0fe1b06"
Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ LIB_GRAPHQL_JAVA_VER = 9.2
4040LIB_JUNIT_VER = 4.12
4141LIB_SPRING_CORE_VER = 5.0.4.RELEASE
4242LIB_SPRING_BOOT_VER = 2.0.5.RELEASE
43- LIB_GRAPHQL_SERVLET_VER = 6.1.4
44- LIB_GRAPHQL_JAVA_TOOLS_VER = 5.3.3
43+ LIB_GRAPHQL_SERVLET_VER = 6.2.0-SNAPSHOT
44+ LIB_GRAPHQL_JAVA_TOOLS_VER = 5.3.4-SNAPSHOT
4545LIB_COMMONS_IO_VER = 2.6
4646
4747GRADLE_WRAPPER_VER = 4.7
Original file line number Diff line number Diff line change 88import graphql .schema .GraphQLSchema ;
99import graphql .servlet .GraphQLSchemaProvider ;
1010import org .springframework .beans .factory .annotation .Autowired ;
11+ import org .springframework .beans .factory .annotation .Value ;
1112import org .springframework .boot .autoconfigure .AutoConfigureAfter ;
1213import org .springframework .boot .autoconfigure .condition .ConditionalOnBean ;
1314import org .springframework .boot .autoconfigure .condition .ConditionalOnClass ;
@@ -39,6 +40,9 @@ public class GraphQLJavaToolsAutoConfiguration {
3940 @ Autowired (required = false )
4041 private SchemaParserOptions options ;
4142
43+ @ Value ("${graphql.tools.introspectionEnabled:true}" )
44+ private boolean introspectionEnabled ;
45+
4246 @ Bean
4347 @ ConditionalOnMissingBean
4448 public SchemaStringProvider schemaStringProvider () {
@@ -67,6 +71,7 @@ public SchemaParser schemaParser(
6771 } else if (perFieldObjectMapperProvider != null ) {
6872 final SchemaParserOptions .Builder optionsBuilder =
6973 newOptions ().objectMapperProvider (perFieldObjectMapperProvider );
74+ optionsBuilder .introspectionEnabled (introspectionEnabled );
7075 builder .options (optionsBuilder .build ());
7176 }
7277
Original file line number Diff line number Diff line change 4444 "name" : " graphql.servlet.maxQueryDepth" ,
4545 "defaultValue" : null ,
4646 "type" : " java.lang.Integer"
47+ },
48+ {
49+ "name" : " graphql.tools.schemaLocationPattern" ,
50+ "defaultValue" : " **/*.graphqls" ,
51+ "type" : " java.lang.String"
52+ },
53+ {
54+ "name" : " graphql.tools.introspectionEnabled" ,
55+ "defaultValue" : true ,
56+ "type" : " java.lang.Boolean"
4757 }
4858 ]
4959}
You can’t perform that action at this time.
0 commit comments