Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 03cb247

Browse files
authored
Merge pull request #194 from wleroux/master
Added subscriptionTimeout option to graphql.servlet
2 parents 0da8ab6 + c699f97 commit 03cb247

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ LIB_GRAPHQL_JAVA_VER = 11.0
4040
LIB_JUNIT_VER = 4.12
4141
LIB_SPRING_CORE_VER = 5.0.4.RELEASE
4242
LIB_SPRING_BOOT_VER = 2.1.0.RELEASE
43-
LIB_GRAPHQL_SERVLET_VER = 7.1.1
43+
LIB_GRAPHQL_SERVLET_VER = 7.2.0
4444
LIB_GRAPHQL_JAVA_TOOLS_VER = 5.4.1
4545
LIB_COMMONS_IO_VER = 2.6
4646
kotlin.version=1.3.10

graphql-spring-boot-autoconfigure/src/main/java/com/oembedler/moon/graphql/boot/GraphQLServletProperties.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public class GraphQLServletProperties {
3636

3737
private boolean exceptionHandlersEnabled = false;
3838

39+
private long subscriptionTimeout = 0;
40+
3941
public String getMapping() {
4042
return mapping != null ? mapping : "/graphql";
4143
}
@@ -95,4 +97,12 @@ public boolean isExceptionHandlersEnabled() {
9597
public void setExceptionHandlersEnabled(boolean exceptionHandlersEnabled) {
9698
this.exceptionHandlersEnabled = exceptionHandlersEnabled;
9799
}
100+
101+
public long getSubscriptionTimeout() {
102+
return subscriptionTimeout;
103+
}
104+
105+
public void setSubscriptionTimeout(long subscriptionTimeout) {
106+
this.subscriptionTimeout = subscriptionTimeout;
107+
}
98108
}

graphql-spring-boot-autoconfigure/src/main/java/com/oembedler/moon/graphql/boot/GraphQLWebAutoConfiguration.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ public GraphQLHttpServlet graphQLHttpServlet(GraphQLInvocationInputFactory invoc
260260
.with(graphQLObjectMapper)
261261
.with(listeners)
262262
.with(graphQLServletProperties.isAsyncModeEnabled())
263+
.with(graphQLServletProperties.getSubscriptionTimeout())
263264
.build();
264265
return GraphQLHttpServlet.with(configuration);
265266
}

0 commit comments

Comments
 (0)