mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Configure allowed HTTP methods in GraphQL transports
This commit adds new "spring.graphql.http.methods" and "spring.graphql.http.sse.methods" configuration properties that let you configure the allowed HTTP methods for the given transports. Closes gh-51732
This commit is contained in:
+3
@@ -96,6 +96,9 @@ The GraphQL HTTP endpoint is at HTTP POST `/graphql` by default.
|
||||
It also supports the `"text/event-stream"` media type over Server Sent Events for subscriptions only.
|
||||
The path can be customized with configprop:spring.graphql.http.path[].
|
||||
|
||||
By default, the HTTP transport only allows HTTP POST requests but this can be configured with configprop:spring.graphql.http.methods[]
|
||||
and configprop:spring.graphql.http.sse.methods[], see {url-spring-graphql-docs}/transports.html[the transports section of the Spring GraphQL documentation] for more.
|
||||
|
||||
TIP: The HTTP endpoint for both Spring MVC and Spring WebFlux is provided by a `RouterFunction` bean with an javadoc:org.springframework.core.annotation.Order[format=annotation] of `0`.
|
||||
If you define your own `RouterFunction` beans, you may want to add appropriate javadoc:org.springframework.core.annotation.Order[format=annotation] annotations to ensure that they are sorted correctly.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user