@@ -35,14 +35,15 @@ public class GraphQLConfiguration {
35
35
private HttpRequestHandler requestHandler ;
36
36
37
37
private GraphQLConfiguration (GraphQLInvocationInputFactory invocationInputFactory ,
38
+ GraphQLInvoker graphQLInvoker ,
38
39
GraphQLQueryInvoker queryInvoker ,
39
40
GraphQLObjectMapper objectMapper , List <GraphQLServletListener > listeners ,
40
41
long subscriptionTimeout , long asyncTimeout ,
41
42
ContextSetting contextSetting ,
42
43
Supplier <BatchInputPreProcessor > batchInputPreProcessor ,
43
44
GraphQLResponseCacheManager responseCacheManager ) {
44
45
this .invocationInputFactory = invocationInputFactory ;
45
- this .graphQLInvoker = queryInvoker .toGraphQLInvoker ();
46
+ this .graphQLInvoker = graphQLInvoker != null ? graphQLInvoker : queryInvoker .toGraphQLInvoker ();
46
47
this .objectMapper = objectMapper ;
47
48
this .listeners = listeners ;
48
49
this .subscriptionTimeout = subscriptionTimeout ;
@@ -124,6 +125,7 @@ public static class Builder {
124
125
125
126
private GraphQLInvocationInputFactory .Builder invocationInputFactoryBuilder ;
126
127
private GraphQLInvocationInputFactory invocationInputFactory ;
128
+ private GraphQLInvoker graphQLInvoker ;
127
129
private GraphQLQueryInvoker queryInvoker = GraphQLQueryInvoker .newBuilder ().build ();
128
130
private GraphQLObjectMapper objectMapper = GraphQLObjectMapper .newBuilder ().build ();
129
131
private List <GraphQLServletListener > listeners = new ArrayList <>();
@@ -141,6 +143,11 @@ private Builder(GraphQLInvocationInputFactory invocationInputFactory) {
141
143
this .invocationInputFactory = invocationInputFactory ;
142
144
}
143
145
146
+ public Builder with (GraphQLInvoker graphQLInvoker ) {
147
+ this .graphQLInvoker = graphQLInvoker ;
148
+ return this ;
149
+ }
150
+
144
151
public Builder with (GraphQLQueryInvoker queryInvoker ) {
145
152
if (queryInvoker != null ) {
146
153
this .queryInvoker = queryInvoker ;
@@ -212,6 +219,7 @@ public GraphQLConfiguration build() {
212
219
return new GraphQLConfiguration (
213
220
this .invocationInputFactory != null ? this .invocationInputFactory
214
221
: invocationInputFactoryBuilder .build (),
222
+ graphQLInvoker ,
215
223
queryInvoker ,
216
224
objectMapper ,
217
225
listeners ,
0 commit comments