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 1b38044a972..46491922582 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 @@ -112,14 +112,14 @@ public class GraphQlWebFluxAutoConfiguration { RouterFunctions.Builder builder = RouterFunctions.route(); builder.route(GraphQlRequestPredicates.graphQlHttp(path), httpHandler::handleRequest); builder.route(GraphQlRequestPredicates.graphQlSse(path), sseHandler::handleRequest); - builder = builder.GET(path, this::onlyAllowPost); + builder.GET(path, this::onlyAllowPost); if (properties.getGraphiql().isEnabled()) { GraphiQlHandler graphQlHandler = new GraphiQlHandler(path, properties.getWebsocket().getPath()); - builder = builder.GET(properties.getGraphiql().getPath(), graphQlHandler::handleRequest); + builder.GET(properties.getGraphiql().getPath(), graphQlHandler::handleRequest); } if (properties.getSchema().getPrinter().isEnabled()) { SchemaHandler schemaHandler = new SchemaHandler(graphQlSource); - builder = builder.GET(path + "/schema", schemaHandler::handleRequest); + builder.GET(path + "/schema", schemaHandler::handleRequest); } return builder.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 abedefa7a7f..0c44464042a 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 @@ -117,14 +117,14 @@ public class GraphQlWebMvcAutoConfiguration { RouterFunctions.Builder builder = RouterFunctions.route(); builder.route(GraphQlRequestPredicates.graphQlHttp(path), httpHandler::handleRequest); builder.route(GraphQlRequestPredicates.graphQlSse(path), sseHandler::handleRequest); - builder = builder.GET(path, this::onlyAllowPost); + builder.GET(path, this::onlyAllowPost); if (properties.getGraphiql().isEnabled()) { GraphiQlHandler graphiQLHandler = new GraphiQlHandler(path, properties.getWebsocket().getPath()); - builder = builder.GET(properties.getGraphiql().getPath(), graphiQLHandler::handleRequest); + builder.GET(properties.getGraphiql().getPath(), graphiQLHandler::handleRequest); } if (properties.getSchema().getPrinter().isEnabled()) { SchemaHandler schemaHandler = new SchemaHandler(graphQlSource); - builder = builder.GET(path + "/schema", schemaHandler::handleRequest); + builder.GET(path + "/schema", schemaHandler::handleRequest); } return builder.build(); }