|
|
|
|
@ -41,6 +41,7 @@ import org.springframework.graphql.execution.RuntimeWiringConfigurer;
@@ -41,6 +41,7 @@ import org.springframework.graphql.execution.RuntimeWiringConfigurer;
|
|
|
|
|
import org.springframework.graphql.server.WebGraphQlHandler; |
|
|
|
|
import org.springframework.graphql.server.WebGraphQlInterceptor; |
|
|
|
|
import org.springframework.graphql.server.webmvc.GraphQlHttpHandler; |
|
|
|
|
import org.springframework.graphql.server.webmvc.GraphQlSseHandler; |
|
|
|
|
import org.springframework.graphql.server.webmvc.GraphQlWebSocketHandler; |
|
|
|
|
import org.springframework.http.HttpHeaders; |
|
|
|
|
import org.springframework.http.HttpStatus; |
|
|
|
|
@ -78,6 +79,15 @@ class GraphQlWebMvcAutoConfigurationTests {
@@ -78,6 +79,15 @@ class GraphQlWebMvcAutoConfigurationTests {
|
|
|
|
|
.doesNotHaveBean(GraphQlWebSocketHandler.class)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void shouldConfigureSseTimeout() { |
|
|
|
|
this.contextRunner.withPropertyValues("spring.graphql.sse.timeout=10s").run((context) -> { |
|
|
|
|
assertThat(context).hasSingleBean(GraphQlSseHandler.class); |
|
|
|
|
GraphQlSseHandler handler = context.getBean(GraphQlSseHandler.class); |
|
|
|
|
assertThat(handler).hasFieldOrPropertyWithValue("timeout", Duration.ofSeconds(10)); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void simpleQueryShouldWork() { |
|
|
|
|
withMockMvc((mvc) -> { |
|
|
|
|
|