@@ -32,6 +32,7 @@ public class GraphQLConfiguration {
3232 private final GraphQLObjectMapper objectMapper ;
3333 private final List <GraphQLServletListener > listeners ;
3434 private final long subscriptionTimeout ;
35+ @ Getter private final boolean asyncEnabled ;
3536 @ Getter private final long asyncTimeout ;
3637 private final ContextSetting contextSetting ;
3738 private final GraphQLResponseCacheManager responseCacheManager ;
@@ -45,6 +46,7 @@ private GraphQLConfiguration(
4546 GraphQLObjectMapper objectMapper ,
4647 List <GraphQLServletListener > listeners ,
4748 long subscriptionTimeout ,
49+ boolean asyncEnabled ,
4850 long asyncTimeout ,
4951 ContextSetting contextSetting ,
5052 Supplier <BatchInputPreProcessor > batchInputPreProcessor ,
@@ -56,6 +58,7 @@ private GraphQLConfiguration(
5658 this .objectMapper = objectMapper ;
5759 this .listeners = listeners ;
5860 this .subscriptionTimeout = subscriptionTimeout ;
61+ this .asyncEnabled = asyncEnabled ;
5962 this .asyncTimeout = asyncTimeout ;
6063 this .contextSetting = contextSetting ;
6164 this .batchInputPreProcessor = batchInputPreProcessor ;
@@ -139,6 +142,7 @@ public static class Builder {
139142 private GraphQLObjectMapper objectMapper = GraphQLObjectMapper .newBuilder ().build ();
140143 private List <GraphQLServletListener > listeners = new ArrayList <>();
141144 private long subscriptionTimeout = 0 ;
145+ private boolean asyncEnabled = false ;
142146 private long asyncTimeout = 30000 ;
143147 private ContextSetting contextSetting = ContextSetting .PER_QUERY_WITH_INSTRUMENTATION ;
144148 private Supplier <BatchInputPreProcessor > batchInputPreProcessorSupplier =
@@ -208,6 +212,11 @@ public Builder with(Executor asyncExecutor) {
208212 return this ;
209213 }
210214
215+ public Builder asyncEnabled (boolean enabled ) {
216+ this .asyncEnabled = enabled ;
217+ return this ;
218+ }
219+
211220 public Builder asyncCorePoolSize (int asyncCorePoolSize ) {
212221 this .asyncCorePoolSize = asyncCorePoolSize ;
213222 return this ;
@@ -275,6 +284,7 @@ public GraphQLConfiguration build() {
275284 objectMapper ,
276285 listeners ,
277286 subscriptionTimeout ,
287+ asyncEnabled ,
278288 asyncTimeout ,
279289 contextSetting ,
280290 batchInputPreProcessorSupplier ,
0 commit comments