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
This commit is contained in:
Brian Clozel
2022-03-21 11:12:59 +01:00
parent a2959bbcf2
commit bae62c39a9
13 changed files with 41 additions and 41 deletions

View File

@@ -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<WebOutput> intercept(WebInput webInput, WebInterceptorChain chain) {
public Mono<WebGraphQlResponse> intercept(WebGraphQlRequest request, Chain chain) {
return null;
}

View File

@@ -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);
}
}