@@ -234,9 +234,9 @@ included in the GraphQL-over-HTTP {request}, they are handled by the {server}
234
234
based on the URL used.
235
235
236
236
Note: Be aware that ` query ` is a misleading parameter name as its value is a
237
- string describing one or more operations, each of which may be a query, mutation
238
- or subscription . A better name would have been ` document ` , but the term ` query `
239
- is well established.
237
+ string describing one or more operations, each of which may be a query or
238
+ mutation . A better name would have been ` document ` , but the term ` query ` is well
239
+ established.
240
240
241
241
Note: Depending on the serialization format used, values of the aforementioned
242
242
parameters can be encoded differently but their names and semantics must stay
@@ -246,7 +246,8 @@ Note: Specifying `null` in JSON (or equivalent values in other formats) as
246
246
values for optional request parameters is equivalent to not specifying them at
247
247
all.
248
248
249
- Note: {variables} and {extensions}, if set, must have a map as their value.
249
+ Note: Each of the {variables} and {extensions} parameters, if set, must have a
250
+ map as their value.
250
251
251
252
## Accept
252
253
@@ -280,8 +281,10 @@ The `query` parameter MUST be the string representation of the Source Text of
280
281
the Document as specified in
281
282
[ the Language section of the GraphQL specification] ( https://spec.graphql.org/draft/#sec-Language ) .
282
283
283
- The ` variables ` parameter, if used, MUST be represented as a URL-encoded JSON
284
- string.
284
+ The ` operationName ` , if present, must be a string.
285
+
286
+ Each of the ` variables ` and ` extensions ` parameters, if used, MUST be
287
+ represented as a URL-encoded JSON string.
285
288
286
289
### Example
287
290
@@ -391,10 +394,10 @@ And the body:
391
394
392
395
# Response
393
396
394
- When a server receives a GraphQL request, it must return a well‐formed response.
395
- The server's response describes the result of validating and executing the
396
- requested operation if successful, and describes any errors encountered during
397
- the request.
397
+ When a server receives a { GraphQL-over-HTTP request} , it must return a
398
+ well‐formed response. The server's response describes the result of validating
399
+ and executing the requested operation if successful, and describes any errors
400
+ encountered during the request.
398
401
399
402
A server must comply with
400
403
[ RFC7231] ( https://datatracker.ietf.org/doc/html/rfc7231 ) .
@@ -552,9 +555,9 @@ The following examples provide guidance on how to deal with specific error cases
552
555
when using the ` application/graphql+json ` media type to encode the response
553
556
body:
554
557
555
- ##### Invalid request body or parsing failure
558
+ ##### Invalid parameters or parsing failure
556
559
557
- For example: ` NONSENSE ` , ` {"qeury": "{__typena `
560
+ For example a POST response body of ` NONSENSE ` or ` {"qeury": "{__typena ` .
558
561
559
562
Requests that do not constitute a well-formed GraphQL request should result in
560
563
status code ` 400 ` (Bad Request).
0 commit comments