Skip to content

Commit 6029e45

Browse files
committed
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
1 parent 70afadc commit 6029e45

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

spring-graphql-docs/src/docs/asciidoc/index.adoc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,13 @@ Spring MVC and one for Spring WebFlux. Both handle requests asynchronously and h
4343
equivalent functionality, but rely on blocking vs non-blocking I/O respectively for
4444
writing the HTTP response.
4545

46-
Requests must use HTTP POST with GraphQL request details included as JSON in the
47-
request body, as defined in the proposed
48-
https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md[GraphQL over HTTP]
49-
specification. Once the JSON body has been successfully decoded, the HTTP response
50-
status is always 200 (OK), and any errors from GraphQL request execution appear in the
51-
"errors" section of the GraphQL response. The default and preferred choice of media type is
52-
`"application/graphql+json"`, but `"application/json"` is also supported, as described in the
53-
specification.
46+
Requests must use HTTP POST with `"application/json"` as content type and GraphQL request details
47+
included as JSON in the request body, as defined in the proposed
48+
https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md[GraphQL over HTTP] specification.
49+
Once the JSON body has been successfully decoded, the HTTP response status is always 200 (OK),
50+
and any errors from GraphQL request execution appear in the "errors" section of the GraphQL response.
51+
The default and preferred choice of media type is `"application/graphql-response+json"`, but `"application/json"`
52+
is also supported, as described in the specification.
5453

5554
`GraphQlHttpHandler` can be exposed as an HTTP endpoint by declaring a `RouterFunction`
5655
bean and using the `RouterFunctions` from Spring MVC or WebFlux to create the route. The

0 commit comments

Comments
 (0)