@@ -73,12 +73,6 @@ public abstract class AbstractGraphQLHttpServlet extends HttpServlet implements
7373 @ Deprecated
7474 protected abstract GraphQLObjectMapper getGraphQLObjectMapper ();
7575
76- /**
77- * @deprecated override {@link #getConfiguration()} instead
78- */
79- @ Deprecated
80- protected abstract GraphQLBatchExecutionHandlerFactory getBatchExecutionHandlerFactory ();
81-
8276 /**
8377 * @deprecated override {@link #getConfiguration()} instead
8478 */
@@ -91,7 +85,6 @@ protected GraphQLConfiguration getConfiguration() {
9185 .with (getGraphQLObjectMapper ())
9286 .with (isAsyncServletMode ())
9387 .with (listeners )
94- .with (getBatchExecutionHandlerFactory ())
9588 .build ();
9689 }
9790
@@ -120,7 +113,6 @@ public void init(ServletConfig servletConfig) {
120113 GraphQLInvocationInputFactory invocationInputFactory = configuration .getInvocationInputFactory ();
121114 GraphQLObjectMapper graphQLObjectMapper = configuration .getObjectMapper ();
122115 GraphQLQueryInvoker queryInvoker = configuration .getQueryInvoker ();
123- GraphQLBatchExecutionHandlerFactory batchExecutionHandlerFactory = configuration .getBatchExecutionHandlerFactory ();
124116
125117 String path = request .getPathInfo ();
126118 if (path == null ) {
@@ -133,7 +125,7 @@ public void init(ServletConfig servletConfig) {
133125 if (query != null ) {
134126
135127 if (isBatchedQuery (query )) {
136- queryBatched (batchExecutionHandlerFactory , queryInvoker , graphQLObjectMapper , invocationInputFactory .createReadOnly (graphQLObjectMapper .readBatchedGraphQLRequest (query ), request , response ), response );
128+ queryBatched (queryInvoker , graphQLObjectMapper , invocationInputFactory .createReadOnly (graphQLObjectMapper .readBatchedGraphQLRequest (query ), request , response ), response );
137129 } else {
138130 final Map <String , Object > variables = new HashMap <>();
139131 if (request .getParameter ("variables" ) != null ) {
@@ -155,7 +147,6 @@ public void init(ServletConfig servletConfig) {
155147 GraphQLInvocationInputFactory invocationInputFactory = configuration .getInvocationInputFactory ();
156148 GraphQLObjectMapper graphQLObjectMapper = configuration .getObjectMapper ();
157149 GraphQLQueryInvoker queryInvoker = configuration .getQueryInvoker ();
158- GraphQLBatchExecutionHandlerFactory batchExecutionHandlerFactory = configuration .getBatchExecutionHandlerFactory ();
159150
160151 try {
161152 if (APPLICATION_GRAPHQL .equals (request .getContentType ())) {
@@ -190,7 +181,7 @@ public void init(ServletConfig servletConfig) {
190181 GraphQLBatchedInvocationInput invocationInput =
191182 invocationInputFactory .create (graphQLRequests , request , response );
192183 invocationInput .getContext ().setParts (fileItems );
193- queryBatched (batchExecutionHandlerFactory , queryInvoker , graphQLObjectMapper , invocationInput , response );
184+ queryBatched (queryInvoker , graphQLObjectMapper , invocationInput , response );
194185 return ;
195186 } else {
196187 GraphQLRequest graphQLRequest ;
@@ -216,7 +207,7 @@ public void init(ServletConfig servletConfig) {
216207 InputStream inputStream = asMarkableInputStream (request .getInputStream ());
217208
218209 if (isBatchedQuery (inputStream )) {
219- queryBatched (batchExecutionHandlerFactory , queryInvoker , graphQLObjectMapper , invocationInputFactory .create (graphQLObjectMapper .readBatchedGraphQLRequest (inputStream ), request , response ), response );
210+ queryBatched (queryInvoker , graphQLObjectMapper , invocationInputFactory .create (graphQLObjectMapper .readBatchedGraphQLRequest (inputStream ), request , response ), response );
220211 } else {
221212 query (queryInvoker , graphQLObjectMapper , invocationInputFactory .create (graphQLObjectMapper .readGraphQLRequest (inputStream ), request , response ), response );
222213 }
@@ -373,13 +364,13 @@ private void query(GraphQLQueryInvoker queryInvoker, GraphQLObjectMapper graphQL
373364 }
374365 }
375366
376- private void queryBatched (GraphQLBatchExecutionHandlerFactory batchInputHandlerFactory , GraphQLQueryInvoker queryInvoker , GraphQLObjectMapper graphQLObjectMapper , GraphQLBatchedInvocationInput invocationInput , HttpServletResponse resp ) throws Exception {
367+ private void queryBatched (GraphQLQueryInvoker queryInvoker , GraphQLObjectMapper graphQLObjectMapper , GraphQLBatchedInvocationInput invocationInput , HttpServletResponse resp ) throws Exception {
377368 resp .setContentType (APPLICATION_JSON_UTF8 );
378369 resp .setStatus (STATUS_OK );
379370
380371 Writer respWriter = resp .getWriter ();
381372
382- queryInvoker .query (invocationInput , batchInputHandlerFactory . getBatchHandler ( respWriter , graphQLObjectMapper ) );
373+ queryInvoker .query (invocationInput , respWriter , graphQLObjectMapper );
383374 }
384375
385376 private <R > List <R > runListeners (Function <? super GraphQLServletListener , R > action ) {
0 commit comments