|
31 | 31 | import graphql.execution.preparsed.PreparsedDocumentProvider;
|
32 | 32 | import graphql.schema.GraphQLSchema;
|
33 | 33 | import graphql.servlet.AbstractGraphQLHttpServlet;
|
| 34 | +import graphql.servlet.BatchExecutionHandler; |
34 | 35 | import graphql.servlet.DefaultExecutionStrategyProvider;
|
35 | 36 | import graphql.servlet.DefaultGraphQLSchemaProvider;
|
36 | 37 | import graphql.servlet.ExecutionStrategyProvider;
|
37 |
| -import graphql.servlet.GraphQLBatchExecutionHandlerFactory; |
38 | 38 | import graphql.servlet.GraphQLConfiguration;
|
39 | 39 | import graphql.servlet.GraphQLContextBuilder;
|
40 | 40 | import graphql.servlet.GraphQLErrorHandler;
|
@@ -128,7 +128,7 @@ public class GraphQLWebAutoConfiguration implements ApplicationContextAware {
|
128 | 128 | private MultipartConfigElement multipartConfigElement;
|
129 | 129 |
|
130 | 130 | @Autowired(required = false)
|
131 |
| - private GraphQLBatchExecutionHandlerFactory graphQLBatchExecutionHandlerFactory; |
| 131 | + private BatchExecutionHandler batchExecutionHandler; |
132 | 132 |
|
133 | 133 | @Override
|
134 | 134 | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
@@ -223,6 +223,10 @@ public GraphQLQueryInvoker queryInvoker(ExecutionStrategyProvider executionStrat
|
223 | 223 | builder.withPreparsedDocumentProvider(preparsedDocumentProvider);
|
224 | 224 | }
|
225 | 225 |
|
| 226 | + if (batchExecutionHandler != null) { |
| 227 | + builder.withBatchExeuctionHandler(batchExecutionHandler); |
| 228 | + } |
| 229 | + |
226 | 230 | return builder.build();
|
227 | 231 | }
|
228 | 232 |
|
@@ -257,14 +261,13 @@ public ObjectMapperProvider objectMapperProvider(ObjectMapper objectMapper) {
|
257 | 261 |
|
258 | 262 | @Bean
|
259 | 263 | @ConditionalOnMissingBean
|
260 |
| - public GraphQLConfiguration graphQLConfiguration(GraphQLInvocationInputFactory invocationInputFactory, GraphQLQueryInvoker queryInvoker, GraphQLObjectMapper graphQLObjectMapper) { |
| 264 | + public GraphQLConfiguration graphQLServletConfiguration(GraphQLInvocationInputFactory invocationInputFactory, GraphQLQueryInvoker queryInvoker, GraphQLObjectMapper graphQLObjectMapper) { |
261 | 265 | return GraphQLConfiguration.with(invocationInputFactory)
|
262 | 266 | .with(queryInvoker)
|
263 | 267 | .with(graphQLObjectMapper)
|
264 | 268 | .with(listeners)
|
265 | 269 | .with(graphQLServletProperties.isAsyncModeEnabled())
|
266 | 270 | .with(graphQLServletProperties.getSubscriptionTimeout())
|
267 |
| - .with(graphQLBatchExecutionHandlerFactory) |
268 | 271 | .build();
|
269 | 272 | }
|
270 | 273 |
|
|
0 commit comments