This repository was archived by the owner on Dec 19, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +24
-5
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 6 files changed +24
-5
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
167
167
graphql:
168
168
tools:
169
169
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
170
173
` ` `
171
174
By default GraphQL tools uses the location pattern `**/*.graphqls` to scan for GraphQL schemas on the classpath.
172
175
Use the `schemaLocationPattern` property to customize this pattern.
Original file line number Diff line number Diff line change 20
20
buildscript {
21
21
repositories {
22
22
mavenLocal()
23
- maven { url " http://dl.bintray.com/graphql-java-kickstart/releases" }
23
+ mavenCentral()
24
+ jcenter()
25
+ maven { url " https://dl.bintray.com/graphql-java-kickstart/releases" }
24
26
maven { url " https://plugins.gradle.org/m2/" }
25
27
maven { url ' http://repo.spring.io/plugins-release' }
26
28
}
@@ -45,8 +47,9 @@ subprojects {
45
47
46
48
repositories {
47
49
mavenLocal()
50
+ mavenCentral()
48
51
jcenter()
49
- maven { url " http://dl.bintray.com/graphql-java-kickstart/releases " }
52
+ maven { url " http://oss.jfrog.org/artifactory/oss-snapshot-local " }
50
53
maven { url " http://repo.spring.io/libs-milestone" }
51
54
}
52
55
Original file line number Diff line number Diff line change 3
3
name : graphql-java-tools-app
4
4
server :
5
5
port : 9000
6
- servlet :
7
- context-path : /abc
8
6
graphiql :
9
7
headers :
10
8
Authorization : " Bearer 05bd9a5f3fe0408f89520946b0fe1b06"
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ LIB_JUNIT_VER = 4.12
41
41
LIB_SPRING_CORE_VER = 5.0.4.RELEASE
42
42
LIB_SPRING_BOOT_VER = 2.0.5.RELEASE
43
43
LIB_GRAPHQL_SERVLET_VER = 6.1.4
44
- LIB_GRAPHQL_JAVA_TOOLS_VER = 5.3.3
44
+ LIB_GRAPHQL_JAVA_TOOLS_VER = 5.3.4-SNAPSHOT
45
45
LIB_COMMONS_IO_VER = 2.6
46
46
47
47
GRADLE_WRAPPER_VER = 4.7
Original file line number Diff line number Diff line change 8
8
import graphql .schema .GraphQLSchema ;
9
9
import graphql .servlet .GraphQLSchemaProvider ;
10
10
import org .springframework .beans .factory .annotation .Autowired ;
11
+ import org .springframework .beans .factory .annotation .Value ;
11
12
import org .springframework .boot .autoconfigure .AutoConfigureAfter ;
12
13
import org .springframework .boot .autoconfigure .condition .ConditionalOnBean ;
13
14
import org .springframework .boot .autoconfigure .condition .ConditionalOnClass ;
@@ -39,6 +40,9 @@ public class GraphQLJavaToolsAutoConfiguration {
39
40
@ Autowired (required = false )
40
41
private SchemaParserOptions options ;
41
42
43
+ @ Value ("${graphql.tools.introspectionEnabled:true}" )
44
+ private boolean introspectionEnabled ;
45
+
42
46
@ Bean
43
47
@ ConditionalOnMissingBean
44
48
public SchemaStringProvider schemaStringProvider () {
@@ -67,6 +71,7 @@ public SchemaParser schemaParser(
67
71
} else if (perFieldObjectMapperProvider != null ) {
68
72
final SchemaParserOptions .Builder optionsBuilder =
69
73
newOptions ().objectMapperProvider (perFieldObjectMapperProvider );
74
+ optionsBuilder .introspectionEnabled (introspectionEnabled );
70
75
builder .options (optionsBuilder .build ());
71
76
}
72
77
Original file line number Diff line number Diff line change 44
44
"name" : " graphql.servlet.maxQueryDepth" ,
45
45
"defaultValue" : null ,
46
46
"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"
47
57
}
48
58
]
49
59
}
You can’t perform that action at this time.
0 commit comments