From bae62c39a922f7706fc04ececb7455c137020893 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Mon, 21 Mar 2022 11:12:59 +0100 Subject: [PATCH] Adapt to latest Spring GraphQL changes This commit adapts to the latest Spring GraphQL changes, renaming `GraphQlService` to `ExecutionGraphQlService` as well as the `WebInterceptor` contract to `WebGraphQlHandlerInterceptor`. See spring-projects/spring-graphql#332 --- .../graphql/GraphQlAutoConfiguration.java | 9 +++++---- .../reactive/GraphQlWebFluxAutoConfiguration.java | 10 +++++----- .../servlet/GraphQlWebMvcAutoConfiguration.java | 10 +++++----- .../graphql/GraphQlAutoConfigurationTests.java | 6 +++--- .../GraphQlQueryByExampleAutoConfigurationTests.java | 4 ++-- .../data/GraphQlQuerydslAutoConfigurationTests.java | 4 ++-- ...lReactiveQueryByExampleAutoConfigurationTests.java | 4 ++-- ...GraphQlReactiveQuerydslAutoConfigurationTests.java | 4 ++-- .../GraphQlWebFluxAutoConfigurationTests.java | 4 ++-- .../servlet/GraphQlWebMvcAutoConfigurationTests.java | 4 ++-- .../tester/GraphQlTesterAutoConfiguration.java | 6 +++--- .../graphql/GraphQlTypeExcludeFilterTests.java | 11 +++++------ .../tester/GraphQlTesterAutoConfigurationTests.java | 6 +++--- 13 files changed, 41 insertions(+), 41 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration.java index 1e5607b4e5..efcadd2031 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration.java @@ -41,12 +41,12 @@ import org.springframework.boot.convert.ApplicationConversionService; import org.springframework.context.annotation.Bean; import org.springframework.core.io.Resource; import org.springframework.core.io.support.ResourcePatternResolver; -import org.springframework.graphql.GraphQlService; +import org.springframework.graphql.ExecutionGraphQlService; import org.springframework.graphql.data.method.annotation.support.AnnotatedControllerConfigurer; import org.springframework.graphql.execution.BatchLoaderRegistry; import org.springframework.graphql.execution.DataFetcherExceptionResolver; import org.springframework.graphql.execution.DefaultBatchLoaderRegistry; -import org.springframework.graphql.execution.ExecutionGraphQlService; +import org.springframework.graphql.execution.DefaultExecutionGraphQlService; import org.springframework.graphql.execution.GraphQlSource; import org.springframework.graphql.execution.RuntimeWiringConfigurer; @@ -123,8 +123,9 @@ public class GraphQlAutoConfiguration { @Bean @ConditionalOnMissingBean - public GraphQlService graphQlService(GraphQlSource graphQlSource, BatchLoaderRegistry batchLoaderRegistry) { - ExecutionGraphQlService service = new ExecutionGraphQlService(graphQlSource); + public ExecutionGraphQlService executionGraphQlService(GraphQlSource graphQlSource, + BatchLoaderRegistry batchLoaderRegistry) { + DefaultExecutionGraphQlService service = new DefaultExecutionGraphQlService(graphQlSource); service.addDataLoaderRegistrar(batchLoaderRegistry); return service; } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java index e781b07175..dc145499f8 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java @@ -39,10 +39,10 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.log.LogMessage; -import org.springframework.graphql.GraphQlService; +import org.springframework.graphql.ExecutionGraphQlService; import org.springframework.graphql.execution.GraphQlSource; import org.springframework.graphql.web.WebGraphQlHandler; -import org.springframework.graphql.web.WebInterceptor; +import org.springframework.graphql.web.WebGraphQlHandlerInterceptor; import org.springframework.graphql.web.webflux.GraphQlHttpHandler; import org.springframework.graphql.web.webflux.GraphQlWebSocketHandler; import org.springframework.graphql.web.webflux.GraphiQlHandler; @@ -77,7 +77,7 @@ import static org.springframework.web.reactive.function.server.RequestPredicates @AutoConfiguration(after = GraphQlAutoConfiguration.class) @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE) @ConditionalOnClass({ GraphQL.class, GraphQlHttpHandler.class }) -@ConditionalOnBean(GraphQlService.class) +@ConditionalOnBean(ExecutionGraphQlService.class) @EnableConfigurationProperties(GraphQlCorsProperties.class) public class GraphQlWebFluxAutoConfiguration { @@ -94,8 +94,8 @@ public class GraphQlWebFluxAutoConfiguration { @Bean @ConditionalOnMissingBean - public WebGraphQlHandler webGraphQlHandler(GraphQlService service, - ObjectProvider interceptorsProvider) { + public WebGraphQlHandler webGraphQlHandler(ExecutionGraphQlService service, + ObjectProvider interceptorsProvider) { return WebGraphQlHandler.builder(service) .interceptors(interceptorsProvider.orderedStream().collect(Collectors.toList())).build(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java index 4021fcded6..74820cdb57 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java @@ -42,11 +42,11 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.log.LogMessage; -import org.springframework.graphql.GraphQlService; +import org.springframework.graphql.ExecutionGraphQlService; import org.springframework.graphql.execution.GraphQlSource; import org.springframework.graphql.execution.ThreadLocalAccessor; import org.springframework.graphql.web.WebGraphQlHandler; -import org.springframework.graphql.web.WebInterceptor; +import org.springframework.graphql.web.WebGraphQlHandlerInterceptor; import org.springframework.graphql.web.webmvc.GraphQlHttpHandler; import org.springframework.graphql.web.webmvc.GraphQlWebSocketHandler; import org.springframework.graphql.web.webmvc.GraphiQlHandler; @@ -81,7 +81,7 @@ import org.springframework.web.socket.server.support.WebSocketHttpRequestHandler @AutoConfiguration(after = GraphQlAutoConfiguration.class) @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET) @ConditionalOnClass({ GraphQL.class, GraphQlHttpHandler.class }) -@ConditionalOnBean(GraphQlService.class) +@ConditionalOnBean(ExecutionGraphQlService.class) @EnableConfigurationProperties(GraphQlCorsProperties.class) public class GraphQlWebMvcAutoConfiguration { @@ -95,8 +95,8 @@ public class GraphQlWebMvcAutoConfiguration { @Bean @ConditionalOnMissingBean - public WebGraphQlHandler webGraphQlHandler(GraphQlService service, - ObjectProvider interceptorsProvider, + public WebGraphQlHandler webGraphQlHandler(ExecutionGraphQlService service, + ObjectProvider interceptorsProvider, ObjectProvider accessorsProvider) { return WebGraphQlHandler.builder(service) .interceptors(interceptorsProvider.orderedStream().collect(Collectors.toList())) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfigurationTests.java index 9d4d4e4f3f..6442162192 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfigurationTests.java @@ -34,7 +34,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.ClassPathResource; -import org.springframework.graphql.GraphQlService; +import org.springframework.graphql.ExecutionGraphQlService; import org.springframework.graphql.data.method.annotation.support.AnnotatedControllerConfigurer; import org.springframework.graphql.execution.BatchLoaderRegistry; import org.springframework.graphql.execution.DataFetcherExceptionResolver; @@ -58,7 +58,7 @@ class GraphQlAutoConfigurationTests { this.contextRunner.run((context) -> { assertThat(context).hasSingleBean(GraphQlSource.class); assertThat(context).hasSingleBean(BatchLoaderRegistry.class); - assertThat(context).hasSingleBean(GraphQlService.class); + assertThat(context).hasSingleBean(ExecutionGraphQlService.class); assertThat(context).hasSingleBean(AnnotatedControllerConfigurer.class); }); } @@ -175,7 +175,7 @@ class GraphQlAutoConfigurationTests { assertThat(context).hasSingleBean(BatchLoaderRegistry.class); assertThat(context.getBean("customBatchLoaderRegistry")) .isSameAs(context.getBean(BatchLoaderRegistry.class)); - assertThat(context.getBean(GraphQlService.class)) + assertThat(context.getBean(ExecutionGraphQlService.class)) .extracting("dataLoaderRegistrars", InstanceOfAssertFactories.list(DataLoaderRegistrar.class)) .containsOnly(context.getBean(BatchLoaderRegistry.class)); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlQueryByExampleAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlQueryByExampleAutoConfigurationTests.java index c2dafc6ed9..1a6bb33aab 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlQueryByExampleAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlQueryByExampleAutoConfigurationTests.java @@ -28,7 +28,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.query.QueryByExampleExecutor; -import org.springframework.graphql.GraphQlService; +import org.springframework.graphql.ExecutionGraphQlService; import org.springframework.graphql.data.GraphQlRepository; import org.springframework.graphql.test.tester.GraphQlServiceTester; @@ -54,7 +54,7 @@ class GraphQlQueryByExampleAutoConfigurationTests { @Test void shouldRegisterDataFetcherForQueryByExampleRepositories() { this.contextRunner.run((context) -> { - GraphQlService graphQlService = context.getBean(GraphQlService.class); + ExecutionGraphQlService graphQlService = context.getBean(ExecutionGraphQlService.class); GraphQlServiceTester graphQlTester = GraphQlServiceTester.create(graphQlService); graphQlTester.document("{ bookById(id: 1) {name}}").execute().path("bookById.name").entity(String.class) .isEqualTo("Test title"); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlQuerydslAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlQuerydslAutoConfigurationTests.java index 9e7e34663d..a534fc14ad 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlQuerydslAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlQuerydslAutoConfigurationTests.java @@ -28,7 +28,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.repository.CrudRepository; -import org.springframework.graphql.GraphQlService; +import org.springframework.graphql.ExecutionGraphQlService; import org.springframework.graphql.data.GraphQlRepository; import org.springframework.graphql.test.tester.GraphQlServiceTester; import org.springframework.graphql.test.tester.GraphQlTester; @@ -55,7 +55,7 @@ class GraphQlQuerydslAutoConfigurationTests { @Test void shouldRegisterDataFetcherForQueryDslRepositories() { this.contextRunner.run((context) -> { - GraphQlService graphQlService = context.getBean(GraphQlService.class); + ExecutionGraphQlService graphQlService = context.getBean(ExecutionGraphQlService.class); GraphQlTester graphQlTester = GraphQlServiceTester.create(graphQlService); graphQlTester.document("{ bookById(id: 1) {name}}").execute().path("bookById.name").entity(String.class) .isEqualTo("Test title"); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlReactiveQueryByExampleAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlReactiveQueryByExampleAutoConfigurationTests.java index ed87b22be0..0fa4857deb 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlReactiveQueryByExampleAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlReactiveQueryByExampleAutoConfigurationTests.java @@ -27,7 +27,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.repository.query.ReactiveQueryByExampleExecutor; import org.springframework.data.repository.reactive.ReactiveCrudRepository; -import org.springframework.graphql.GraphQlService; +import org.springframework.graphql.ExecutionGraphQlService; import org.springframework.graphql.data.GraphQlRepository; import org.springframework.graphql.test.tester.GraphQlServiceTester; import org.springframework.graphql.test.tester.GraphQlTester; @@ -54,7 +54,7 @@ class GraphQlReactiveQueryByExampleAutoConfigurationTests { @Test void shouldRegisterDataFetcherForQueryByExampleRepositories() { this.contextRunner.run((context) -> { - GraphQlService graphQlService = context.getBean(GraphQlService.class); + ExecutionGraphQlService graphQlService = context.getBean(ExecutionGraphQlService.class); GraphQlTester graphQlTester = GraphQlServiceTester.create(graphQlService); graphQlTester.document("{ bookById(id: 1) {name}}").execute().path("bookById.name").entity(String.class) .isEqualTo("Test title"); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlReactiveQuerydslAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlReactiveQuerydslAutoConfigurationTests.java index dcefb935ee..901aee0599 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlReactiveQuerydslAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlReactiveQuerydslAutoConfigurationTests.java @@ -27,7 +27,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.querydsl.ReactiveQuerydslPredicateExecutor; import org.springframework.data.repository.reactive.ReactiveCrudRepository; -import org.springframework.graphql.GraphQlService; +import org.springframework.graphql.ExecutionGraphQlService; import org.springframework.graphql.data.GraphQlRepository; import org.springframework.graphql.test.tester.GraphQlServiceTester; import org.springframework.graphql.test.tester.GraphQlTester; @@ -54,7 +54,7 @@ class GraphQlReactiveQuerydslAutoConfigurationTests { @Test void shouldRegisterDataFetcherForQueryDslRepositories() { this.contextRunner.run((context) -> { - GraphQlService graphQlService = context.getBean(GraphQlService.class); + ExecutionGraphQlService graphQlService = context.getBean(ExecutionGraphQlService.class); GraphQlTester graphQlTester = GraphQlServiceTester.create(graphQlService); graphQlTester.document("{ bookById(id: 1) {name}}").execute().path("bookById.name").entity(String.class) .isEqualTo("Test title"); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfigurationTests.java index a1a5b17fb9..7ff15664bf 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfigurationTests.java @@ -34,7 +34,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.graphql.execution.RuntimeWiringConfigurer; import org.springframework.graphql.web.WebGraphQlHandler; -import org.springframework.graphql.web.WebInterceptor; +import org.springframework.graphql.web.WebGraphQlHandlerInterceptor; import org.springframework.graphql.web.webflux.GraphQlHttpHandler; import org.springframework.graphql.web.webflux.GraphQlWebSocketHandler; import org.springframework.http.HttpHeaders; @@ -172,7 +172,7 @@ class GraphQlWebFluxAutoConfigurationTests { static class CustomWebInterceptor { @Bean - WebInterceptor customWebInterceptor() { + WebGraphQlHandlerInterceptor customWebGraphQlHandlerInterceptor() { return (webInput, interceptorChain) -> interceptorChain.next(webInput) .doOnNext((output) -> output.getResponseHeaders().add("X-Custom-Header", "42")); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfigurationTests.java index d254b619eb..49acfd1841 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfigurationTests.java @@ -32,7 +32,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.graphql.execution.RuntimeWiringConfigurer; import org.springframework.graphql.web.WebGraphQlHandler; -import org.springframework.graphql.web.WebInterceptor; +import org.springframework.graphql.web.WebGraphQlHandlerInterceptor; import org.springframework.graphql.web.webmvc.GraphQlHttpHandler; import org.springframework.graphql.web.webmvc.GraphQlWebSocketHandler; import org.springframework.http.HttpHeaders; @@ -183,7 +183,7 @@ class GraphQlWebMvcAutoConfigurationTests { static class CustomWebInterceptor { @Bean - WebInterceptor customWebInterceptor() { + WebGraphQlHandlerInterceptor customWebGraphQlHandlerInterceptor() { return (webInput, interceptorChain) -> interceptorChain.next(webInput) .doOnNext((output) -> output.getResponseHeaders().add("X-Custom-Header", "42")); } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/graphql/tester/GraphQlTesterAutoConfiguration.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/graphql/tester/GraphQlTesterAutoConfiguration.java index d2e654ee79..c33250c4b6 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/graphql/tester/GraphQlTesterAutoConfiguration.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/graphql/tester/GraphQlTesterAutoConfiguration.java @@ -24,7 +24,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration; import org.springframework.context.annotation.Bean; -import org.springframework.graphql.GraphQlService; +import org.springframework.graphql.ExecutionGraphQlService; import org.springframework.graphql.test.tester.GraphQlServiceTester; import org.springframework.graphql.test.tester.GraphQlTester; @@ -39,9 +39,9 @@ import org.springframework.graphql.test.tester.GraphQlTester; public class GraphQlTesterAutoConfiguration { @Bean - @ConditionalOnBean(GraphQlService.class) + @ConditionalOnBean(ExecutionGraphQlService.class) @ConditionalOnMissingBean - public GraphQlServiceTester graphQlTester(GraphQlService graphQlService) { + public GraphQlServiceTester graphQlTester(ExecutionGraphQlService graphQlService) { return GraphQlServiceTester.create(graphQlService); } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/graphql/GraphQlTypeExcludeFilterTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/graphql/GraphQlTypeExcludeFilterTests.java index 098a3a765b..b83ebd694d 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/graphql/GraphQlTypeExcludeFilterTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/graphql/GraphQlTypeExcludeFilterTests.java @@ -47,10 +47,9 @@ import org.springframework.core.type.classreading.SimpleMetadataReaderFactory; import org.springframework.graphql.execution.DataFetcherExceptionResolver; import org.springframework.graphql.execution.GraphQlSource.Builder; import org.springframework.graphql.execution.RuntimeWiringConfigurer; -import org.springframework.graphql.web.WebInput; -import org.springframework.graphql.web.WebInterceptor; -import org.springframework.graphql.web.WebInterceptorChain; -import org.springframework.graphql.web.WebOutput; +import org.springframework.graphql.web.WebGraphQlHandlerInterceptor; +import org.springframework.graphql.web.WebGraphQlRequest; +import org.springframework.graphql.web.WebGraphQlResponse; import org.springframework.stereotype.Controller; import org.springframework.stereotype.Repository; import org.springframework.stereotype.Service; @@ -200,10 +199,10 @@ class GraphQlTypeExcludeFilterTests { } - static class ExampleWebInterceptor implements WebInterceptor { + static class ExampleWebInterceptor implements WebGraphQlHandlerInterceptor { @Override - public Mono intercept(WebInput webInput, WebInterceptorChain chain) { + public Mono intercept(WebGraphQlRequest request, Chain chain) { return null; } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/graphql/tester/GraphQlTesterAutoConfigurationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/graphql/tester/GraphQlTesterAutoConfigurationTests.java index 322902f430..e33ee5e580 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/graphql/tester/GraphQlTesterAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/graphql/tester/GraphQlTesterAutoConfigurationTests.java @@ -22,7 +22,7 @@ import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.graphql.GraphQlService; +import org.springframework.graphql.ExecutionGraphQlService; import org.springframework.graphql.test.tester.GraphQlTester; import static org.assertj.core.api.Assertions.assertThat; @@ -53,8 +53,8 @@ class GraphQlTesterAutoConfigurationTests { static class CustomGraphQlServiceConfiguration { @Bean - GraphQlService graphQlService() { - return mock(GraphQlService.class); + ExecutionGraphQlService graphQlService() { + return mock(ExecutionGraphQlService.class); } }