Skip to content

Commit 93728cd

Browse files
committed
Merge branch '3.1.x' into 3.2.x
Closes gh-40600
2 parents bd16fc4 + a22c909 commit 93728cd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ public RouterFunction<ServerResponse> graphQlRouterFunction(GraphQlHttpHandler h
112112
String path = properties.getPath();
113113
logger.info(LogMessage.format("GraphQL endpoint HTTP POST %s", path));
114114
RouterFunctions.Builder builder = RouterFunctions.route();
115-
builder = builder.POST(path, SUPPORTS_MEDIATYPES, httpHandler::handleRequest);
116-
builder = builder.GET(path, this::onlyAllowPost);
115+
builder.POST(path, SUPPORTS_MEDIATYPES, httpHandler::handleRequest);
116+
builder.GET(path, this::onlyAllowPost);
117117
if (properties.getGraphiql().isEnabled()) {
118118
GraphiQlHandler graphQlHandler = new GraphiQlHandler(path, properties.getWebsocket().getPath());
119-
builder = builder.GET(properties.getGraphiql().getPath(), graphQlHandler::handleRequest);
119+
builder.GET(properties.getGraphiql().getPath(), graphQlHandler::handleRequest);
120120
}
121121
if (properties.getSchema().getPrinter().isEnabled()) {
122122
SchemaHandler schemaHandler = new SchemaHandler(graphQlSource);
123-
builder = builder.GET(path + "/schema", schemaHandler::handleRequest);
123+
builder.GET(path + "/schema", schemaHandler::handleRequest);
124124
}
125125
return builder.build();
126126
}

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,16 @@ public RouterFunction<ServerResponse> graphQlRouterFunction(GraphQlHttpHandler h
112112
String path = properties.getPath();
113113
logger.info(LogMessage.format("GraphQL endpoint HTTP POST %s", path));
114114
RouterFunctions.Builder builder = RouterFunctions.route();
115-
builder = builder.POST(path, RequestPredicates.contentType(MediaType.APPLICATION_JSON)
115+
builder.POST(path, RequestPredicates.contentType(MediaType.APPLICATION_JSON)
116116
.and(RequestPredicates.accept(SUPPORTED_MEDIA_TYPES)), httpHandler::handleRequest);
117-
builder = builder.GET(path, this::onlyAllowPost);
117+
builder.GET(path, this::onlyAllowPost);
118118
if (properties.getGraphiql().isEnabled()) {
119119
GraphiQlHandler graphiQLHandler = new GraphiQlHandler(path, properties.getWebsocket().getPath());
120-
builder = builder.GET(properties.getGraphiql().getPath(), graphiQLHandler::handleRequest);
120+
builder.GET(properties.getGraphiql().getPath(), graphiQLHandler::handleRequest);
121121
}
122122
if (properties.getSchema().getPrinter().isEnabled()) {
123123
SchemaHandler schemaHandler = new SchemaHandler(graphQlSource);
124-
builder = builder.GET(path + "/schema", schemaHandler::handleRequest);
124+
builder.GET(path + "/schema", schemaHandler::handleRequest);
125125
}
126126
return builder.build();
127127
}

0 commit comments

Comments
 (0)