@@ -193,10 +193,11 @@ And for a _GraphQL response_:
193193For details of the shapes of these JSON payloads, please see
194194[ Request] ( #sec-Request ) and [ Response] ( #sec-Response ) .
195195
196- If the media type in a ` Content-Type ` or ` Accept ` header includes encoding
197- information, then the encoding MUST be ` utf-8 ` (e.g.
198- ` Content-Type: application/graphql-response+json; charset=utf-8 ` ). If encoding
199- information is not included then ` utf-8 ` MUST be assumed.
196+ If the media type in a ` Content-Type ` or ` Accept ` header does not include
197+ encoding information and matches one of the officially recognized GraphQL media
198+ types, then ` utf-8 ` MUST be assumed (e.g. for header
199+ ` Content-Type: application/graphql-response+json ` , UTF-8 encoding would be
200+ assumed).
200201
201202# Request
202203
@@ -328,7 +329,10 @@ A client MUST indicate the media type of a request body using the `Content-Type`
328329header as specified in [ RFC7231] ( https://datatracker.ietf.org/doc/html/rfc7231 ) .
329330
330331A server MUST support POST requests encoded with the ` application/json ` media
331- type (as indicated by the ` Content-Type ` header).
332+ type (as indicated by the ` Content-Type ` header) encoded with UTF-8.
333+
334+ For POST requests using an officially recognized GraphQL ` Content-Type ` without
335+ indicating an encoding, the server MUST assume the encoding is ` utf-8 ` .
332336
333337If the client does not supply a ` Content-Type ` header with a POST request, the
334338server SHOULD reject the request using the appropriate ` 4xx ` status code.
@@ -339,7 +343,7 @@ they wish when none is supplied, with the understanding that parsing the request
339343may fail.
340344
341345A server MAY support POST requests encoded with and/or accepting other media
342- types.
346+ types or encodings .
343347
344348If a client does not know the media types the server supports then it SHOULD
345349encode the request body in JSON (i.e. with ` Content-Type: application/json ` ).
@@ -415,7 +419,8 @@ The body of the server's response MUST follow the requirements for a
415419[ GraphQL response] ( #sec-Response ) , encoded directly in the chosen media type.
416420
417421A server MUST indicate the media type of the response with a ` Content-Type `
418- header.
422+ header, and SHOULD indicate the encoding (e.g.
423+ ` application/graphql-response+json; charset=utf-8 ` ).
419424
420425If an ` Accept ` header is provided, the server MUST respect the given ` Accept `
421426header and attempt to encode the response in the highest priority media type
@@ -451,7 +456,7 @@ January 2025.
451456
452457From 1st January 2025 (` 2025-01-01T00:00:00Z ` ), a server MUST support requests
453458which accept the ` application/graphql-response+json ` media type (as indicated by
454- the ` Accept ` header).
459+ the ` Accept ` header) using the UTF-8 encoding .
455460
456461Before 1st January 2025 (` 2025-01-01T00:00:00Z ` ), if the client does not supply
457462an ` Accept ` header, the server SHOULD treat the request as if it had
0 commit comments