Skip to content

Commit 0e58408

Browse files
committed
Revert "fix(#469): use separate async enabled property"
This reverts commit 0b1f0f4.
1 parent 0b1f0f4 commit 0e58408

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=13.0.1-SNAPSHOT
1+
version=14.0.0-SNAPSHOT
22
group=com.graphql-java-kickstart
33
PROJECT_NAME=graphql-java-servlet
44
PROJECT_DESC=GraphQL Java Kickstart

graphql-java-servlet/src/main/java/graphql/kickstart/servlet/GraphQLConfiguration.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ 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;
3635
@Getter private final long asyncTimeout;
3736
private final ContextSetting contextSetting;
3837
private final GraphQLResponseCacheManager responseCacheManager;
@@ -46,7 +45,6 @@ private GraphQLConfiguration(
4645
GraphQLObjectMapper objectMapper,
4746
List<GraphQLServletListener> listeners,
4847
long subscriptionTimeout,
49-
boolean asyncEnabled,
5048
long asyncTimeout,
5149
ContextSetting contextSetting,
5250
Supplier<BatchInputPreProcessor> batchInputPreProcessor,
@@ -58,7 +56,6 @@ private GraphQLConfiguration(
5856
this.objectMapper = objectMapper;
5957
this.listeners = listeners;
6058
this.subscriptionTimeout = subscriptionTimeout;
61-
this.asyncEnabled = asyncEnabled;
6259
this.asyncTimeout = asyncTimeout;
6360
this.contextSetting = contextSetting;
6461
this.batchInputPreProcessor = batchInputPreProcessor;
@@ -142,7 +139,6 @@ public static class Builder {
142139
private GraphQLObjectMapper objectMapper = GraphQLObjectMapper.newBuilder().build();
143140
private List<GraphQLServletListener> listeners = new ArrayList<>();
144141
private long subscriptionTimeout = 0;
145-
private boolean asyncEnabled = false;
146142
private long asyncTimeout = 30000;
147143
private ContextSetting contextSetting = ContextSetting.PER_QUERY_WITH_INSTRUMENTATION;
148144
private Supplier<BatchInputPreProcessor> batchInputPreProcessorSupplier =
@@ -212,11 +208,6 @@ public Builder with(Executor asyncExecutor) {
212208
return this;
213209
}
214210

215-
public Builder asyncEnabled(boolean enabled) {
216-
this.asyncEnabled = enabled;
217-
return this;
218-
}
219-
220211
public Builder asyncCorePoolSize(int asyncCorePoolSize) {
221212
this.asyncCorePoolSize = asyncCorePoolSize;
222213
return this;
@@ -284,7 +275,6 @@ public GraphQLConfiguration build() {
284275
objectMapper,
285276
listeners,
286277
subscriptionTimeout,
287-
asyncEnabled,
288278
asyncTimeout,
289279
contextSetting,
290280
batchInputPreProcessorSupplier,

graphql-java-servlet/src/main/java/graphql/kickstart/servlet/HttpRequestInvokerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void execute(
4141
HttpServletRequest request,
4242
HttpServletResponse response,
4343
ListenerHandler listenerHandler) {
44-
if (configuration.isAsyncEnabled()) {
44+
if (request.isAsyncSupported()) {
4545
invokeAndHandleAsync(invocationInput, request, response, listenerHandler);
4646
} else {
4747
handle(invocationInput, request, response, listenerHandler);

0 commit comments

Comments
 (0)