Skip to content

Commit 8d1e877

Browse files
committed
Merge branch '3.2.x'
Closes gh-39625
2 parents b0914f8 + 057432c commit 8d1e877

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ 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.GET(path, this::onlyAllowPost);
116115
builder = builder.POST(path, SUPPORTS_MEDIATYPES, httpHandler::handleRequest);
116+
builder = builder.GET(path, this::onlyAllowPost);
117117
if (properties.getGraphiql().isEnabled()) {
118118
GraphiQlHandler graphQlHandler = new GraphiQlHandler(path, properties.getWebsocket().getPath());
119119
builder = builder.GET(properties.getGraphiql().getPath(), graphQlHandler::handleRequest);

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ 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.GET(path, this::onlyAllowPost);
116115
builder = builder.POST(path, RequestPredicates.contentType(MediaType.APPLICATION_JSON)
117116
.and(RequestPredicates.accept(SUPPORTED_MEDIA_TYPES)), httpHandler::handleRequest);
117+
builder = builder.GET(path, this::onlyAllowPost);
118118
if (properties.getGraphiql().isEnabled()) {
119119
GraphiQlHandler graphiQLHandler = new GraphiQlHandler(path, properties.getWebsocket().getPath());
120120
builder = builder.GET(properties.getGraphiql().getPath(), graphiQLHandler::handleRequest);

0 commit comments

Comments
 (0)