@@ -32,6 +32,7 @@ public class GraphQLConfiguration {
32
32
private final GraphQLObjectMapper objectMapper ;
33
33
private final List <GraphQLServletListener > listeners ;
34
34
private final long subscriptionTimeout ;
35
+ @ Getter private final boolean asyncEnabled ;
35
36
@ Getter private final long asyncTimeout ;
36
37
private final ContextSetting contextSetting ;
37
38
private final GraphQLResponseCacheManager responseCacheManager ;
@@ -45,6 +46,7 @@ private GraphQLConfiguration(
45
46
GraphQLObjectMapper objectMapper ,
46
47
List <GraphQLServletListener > listeners ,
47
48
long subscriptionTimeout ,
49
+ boolean asyncEnabled ,
48
50
long asyncTimeout ,
49
51
ContextSetting contextSetting ,
50
52
Supplier <BatchInputPreProcessor > batchInputPreProcessor ,
@@ -56,6 +58,7 @@ private GraphQLConfiguration(
56
58
this .objectMapper = objectMapper ;
57
59
this .listeners = listeners ;
58
60
this .subscriptionTimeout = subscriptionTimeout ;
61
+ this .asyncEnabled = asyncEnabled ;
59
62
this .asyncTimeout = asyncTimeout ;
60
63
this .contextSetting = contextSetting ;
61
64
this .batchInputPreProcessor = batchInputPreProcessor ;
@@ -139,6 +142,7 @@ public static class Builder {
139
142
private GraphQLObjectMapper objectMapper = GraphQLObjectMapper .newBuilder ().build ();
140
143
private List <GraphQLServletListener > listeners = new ArrayList <>();
141
144
private long subscriptionTimeout = 0 ;
145
+ private boolean asyncEnabled = false ;
142
146
private long asyncTimeout = 30000 ;
143
147
private ContextSetting contextSetting = ContextSetting .PER_QUERY_WITH_INSTRUMENTATION ;
144
148
private Supplier <BatchInputPreProcessor > batchInputPreProcessorSupplier =
@@ -208,6 +212,11 @@ public Builder with(Executor asyncExecutor) {
208
212
return this ;
209
213
}
210
214
215
+ public Builder asyncEnabled (boolean enabled ) {
216
+ this .asyncEnabled = enabled ;
217
+ return this ;
218
+ }
219
+
211
220
public Builder asyncCorePoolSize (int asyncCorePoolSize ) {
212
221
this .asyncCorePoolSize = asyncCorePoolSize ;
213
222
return this ;
@@ -275,6 +284,7 @@ public GraphQLConfiguration build() {
275
284
objectMapper ,
276
285
listeners ,
277
286
subscriptionTimeout ,
287
+ asyncEnabled ,
278
288
asyncTimeout ,
279
289
contextSetting ,
280
290
batchInputPreProcessorSupplier ,
0 commit comments