|
31 | 31 | import graphql.execution.preparsed.PreparsedDocumentProvider; |
32 | 32 | import graphql.schema.GraphQLSchema; |
33 | 33 | import graphql.servlet.AbstractGraphQLHttpServlet; |
34 | | -import graphql.servlet.BatchExecutionHandler; |
35 | | -import graphql.servlet.DefaultExecutionStrategyProvider; |
36 | | -import graphql.servlet.DefaultGraphQLSchemaProvider; |
37 | | -import graphql.servlet.ExecutionStrategyProvider; |
38 | | -import graphql.servlet.GraphQLConfiguration; |
39 | | -import graphql.servlet.GraphQLContextBuilder; |
40 | | -import graphql.servlet.GraphQLErrorHandler; |
41 | 34 | import graphql.servlet.GraphQLHttpServlet; |
42 | | -import graphql.servlet.GraphQLInvocationInputFactory; |
43 | | -import graphql.servlet.GraphQLObjectMapper; |
44 | | -import graphql.servlet.GraphQLQueryInvoker; |
45 | | -import graphql.servlet.GraphQLRootObjectBuilder; |
46 | | -import graphql.servlet.GraphQLSchemaProvider; |
47 | | -import graphql.servlet.GraphQLServletListener; |
48 | | -import graphql.servlet.ObjectMapperConfigurer; |
49 | | -import graphql.servlet.ObjectMapperProvider; |
| 35 | +import graphql.servlet.config.DefaultExecutionStrategyProvider; |
| 36 | +import graphql.servlet.config.DefaultGraphQLSchemaProvider; |
| 37 | +import graphql.servlet.config.ExecutionStrategyProvider; |
| 38 | +import graphql.servlet.config.GraphQLConfiguration; |
| 39 | +import graphql.servlet.config.GraphQLSchemaProvider; |
| 40 | +import graphql.servlet.config.ObjectMapperConfigurer; |
| 41 | +import graphql.servlet.config.ObjectMapperProvider; |
| 42 | +import graphql.servlet.context.GraphQLContextBuilder; |
| 43 | +import graphql.servlet.core.GraphQLErrorHandler; |
| 44 | +import graphql.servlet.core.GraphQLObjectMapper; |
| 45 | +import graphql.servlet.core.GraphQLQueryInvoker; |
| 46 | +import graphql.servlet.core.GraphQLRootObjectBuilder; |
| 47 | +import graphql.servlet.core.GraphQLServletListener; |
| 48 | +import graphql.servlet.input.BatchInputPreProcessor; |
| 49 | +import graphql.servlet.input.GraphQLInvocationInputFactory; |
50 | 50 | import lombok.extern.slf4j.Slf4j; |
51 | 51 | import org.springframework.beans.factory.ObjectProvider; |
52 | 52 | import org.springframework.beans.factory.annotation.Autowired; |
|
73 | 73 | import java.util.Map; |
74 | 74 | import java.util.Optional; |
75 | 75 |
|
76 | | -import static graphql.servlet.GraphQLObjectMapper.newBuilder; |
| 76 | +import static graphql.servlet.core.GraphQLObjectMapper.*; |
77 | 77 |
|
78 | 78 |
|
79 | 79 | /** |
@@ -127,7 +127,7 @@ public class GraphQLWebAutoConfiguration { |
127 | 127 | private MultipartConfigElement multipartConfigElement; |
128 | 128 |
|
129 | 129 | @Autowired(required = false) |
130 | | - private BatchExecutionHandler batchExecutionHandler; |
| 130 | + private BatchInputPreProcessor batchInputPreProcessor; |
131 | 131 |
|
132 | 132 | @PostConstruct |
133 | 133 | void postConstruct() { |
@@ -228,10 +228,6 @@ public GraphQLQueryInvoker queryInvoker(ExecutionStrategyProvider executionStrat |
228 | 228 | builder.withPreparsedDocumentProvider(preparsedDocumentProvider); |
229 | 229 | } |
230 | 230 |
|
231 | | - if (batchExecutionHandler != null) { |
232 | | - builder.withBatchExeuctionHandler(batchExecutionHandler); |
233 | | - } |
234 | | - |
235 | 231 | return builder.build(); |
236 | 232 | } |
237 | 233 |
|
@@ -273,6 +269,8 @@ public GraphQLConfiguration graphQLServletConfiguration(GraphQLInvocationInputFa |
273 | 269 | .with(listeners) |
274 | 270 | .with(graphQLServletProperties.isAsyncModeEnabled()) |
275 | 271 | .with(graphQLServletProperties.getSubscriptionTimeout()) |
| 272 | + .with(batchInputPreProcessor) |
| 273 | + .with(graphQLServletProperties.getContextSetting()) |
276 | 274 | .build(); |
277 | 275 | } |
278 | 276 |
|
|
0 commit comments