@@ -183,10 +183,12 @@ using the JSON encoding for GraphQL requests:
183183
184184And for a _ GraphQL response_ :
185185
186- | Name | Description |
187- | ----------------------------------- | ---------------------------------------- |
188- | ` application/graphql-response+json ` | The preferred type for server responses |
189- | ` application/json ` | An alternative type for responses |
186+ | Name | Description |
187+ | ----------------------------------- | --------------------------------------- |
188+ | ` application/graphql-response+json ` | The preferred type for server responses |
189+
190+ Note: Servers MAY additionally support ` application/json ` as a response media
191+ type.
190192
191193For details of the shapes of these JSON payloads, please see
192194[ Request] ( #sec-Request ) and [ Response] ( #sec-Response ) .
@@ -249,11 +251,6 @@ A client MUST indicate the media types that it supports in responses using the
249251` Accept ` HTTP header as specified in
250252[ RFC7231] ( https://datatracker.ietf.org/doc/html/rfc7231 ) .
251253
252- Note: If a client does not supply the ` Accept ` header then the server may
253- respond with an error, or with any content type it chooses (including serving a
254- valid GraphQL response under a media type of its choosing). To ensure your
255- client gets something useful, it needs to indicate the media types it supports.
256-
257254The client MUST include the media type ` application/graphql-response+json ` in
258255the ` Accept ` header.
259256
@@ -453,14 +450,14 @@ one of the media types it has requested, hence `406 Not Acceptable` being the
453450recommended response. However, the server authors may know better about the
454451specific clients consuming their endpoint, thus both approaches are permitted.
455452
456- A _ server_ MUST support responses using the
457- ` application/graphql-response+json ` media type.
453+ A _ server_ MUST support responses using the ` application/graphql-response+json `
454+ media type.
458455
459456A server MAY additionally support the ` application/json ` response media type.
460457
461- Note: Servers may wish to only support the
462- ` application/graphql-response+json ` media type so that related HTTP tooling may
463- utilize the HTTP status codes of responses without having to be GraphQL-aware.
458+ Note: Servers may wish to only support the ` application/graphql-response+json `
459+ media type so that related HTTP tooling may utilize the HTTP status codes of
460+ responses without having to be GraphQL-aware.
464461
465462## Validation
466463
@@ -537,7 +534,8 @@ response body.
537534
538535### Examples
539536
540- The following examples provide guidance on how to deal with specific error cases:
537+ The following examples provide guidance on how to deal with specific error
538+ cases:
541539
542540#### JSON parsing failure
543541
0 commit comments