From 6029e458250ef3c5206a23eb72b7334ca36cca7d Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Tue, 6 Dec 2022 15:00:07 +0100 Subject: [PATCH] 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 --- spring-graphql-docs/src/docs/asciidoc/index.adoc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/spring-graphql-docs/src/docs/asciidoc/index.adoc b/spring-graphql-docs/src/docs/asciidoc/index.adoc index 8b8a373f..c44b002e 100644 --- a/spring-graphql-docs/src/docs/asciidoc/index.adoc +++ b/spring-graphql-docs/src/docs/asciidoc/index.adoc @@ -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