Reflect media type changes in reference documentation
This commit mentions the `"application/graphql-response+json`" media type in the reference documentation as the main media type used by the server. See gh-563
This commit is contained in:
@@ -43,14 +43,13 @@ Spring MVC and one for Spring WebFlux. Both handle requests asynchronously and h
|
||||
equivalent functionality, but rely on blocking vs non-blocking I/O respectively for
|
||||
writing the HTTP response.
|
||||
|
||||
Requests must use HTTP POST with GraphQL request details included as JSON in the
|
||||
request body, as defined in the proposed
|
||||
https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md[GraphQL over HTTP]
|
||||
specification. Once the JSON body has been successfully decoded, the HTTP response
|
||||
status is always 200 (OK), and any errors from GraphQL request execution appear in the
|
||||
"errors" section of the GraphQL response. The default and preferred choice of media type is
|
||||
`"application/graphql+json"`, but `"application/json"` is also supported, as described in the
|
||||
specification.
|
||||
Requests must use HTTP POST with `"application/json"` as content type and GraphQL request details
|
||||
included as JSON in the request body, as defined in the proposed
|
||||
https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md[GraphQL over HTTP] specification.
|
||||
Once the JSON body has been successfully decoded, the HTTP response status is always 200 (OK),
|
||||
and any errors from GraphQL request execution appear in the "errors" section of the GraphQL response.
|
||||
The default and preferred choice of media type is `"application/graphql-response+json"`, but `"application/json"`
|
||||
is also supported, as described in the specification.
|
||||
|
||||
`GraphQlHttpHandler` can be exposed as an HTTP endpoint by declaring a `RouterFunction`
|
||||
bean and using the `RouterFunctions` from Spring MVC or WebFlux to create the route. The
|
||||
|
||||
Reference in New Issue
Block a user