@@ -216,9 +216,9 @@ included in the GraphQL-over-HTTP _request_, they are handled by the _server_
216
216
based on the URL used.
217
217
218
218
Note: Be aware that ` query ` is a misleading parameter name as its value is a
219
- string describing one or more operations, each of which may be a query, mutation
220
- or subscription . A better name would have been ` document ` , but the term ` query `
221
- is well established.
219
+ string describing one or more operations, each of which may be a query or
220
+ mutation . A better name would have been ` document ` , but the term ` query ` is well
221
+ established.
222
222
223
223
Note: Depending on the serialization format used, values of the aforementioned
224
224
parameters can be encoded differently but their names and semantics must stay
@@ -228,7 +228,8 @@ Note: Specifying `null` in JSON (or equivalent values in other formats) as
228
228
values for optional request parameters is equivalent to not specifying them at
229
229
all.
230
230
231
- Note: {variables} and {extensions}, if set, must have a map as their value.
231
+ Note: Each of the {variables} and {extensions} parameters, if set, must have a
232
+ map as their value.
232
233
233
234
## Accept
234
235
@@ -262,8 +263,10 @@ The `query` parameter MUST be the string representation of the Source Text of
262
263
the Document as specified in
263
264
[ the Language section of the GraphQL specification] ( https://spec.graphql.org/draft/#sec-Language ) .
264
265
265
- The ` variables ` parameter, if used, MUST be represented as a URL-encoded JSON
266
- string.
266
+ The ` operationName ` , if present, must be a string.
267
+
268
+ Each of the ` variables ` and ` extensions ` parameters, if used, MUST be
269
+ represented as a URL-encoded JSON string.
267
270
268
271
### Example
269
272
@@ -373,10 +376,10 @@ And the body:
373
376
374
377
# Response
375
378
376
- When a server receives a GraphQL request, it must return a well‐formed response.
377
- The server's response describes the result of validating and executing the
378
- requested operation if successful, and describes any errors encountered during
379
- the request.
379
+ When a server receives a { GraphQL-over-HTTP request} , it must return a
380
+ well‐formed response. The server's response describes the result of validating
381
+ and executing the requested operation if successful, and describes any errors
382
+ encountered during the request.
380
383
381
384
A server must comply with
382
385
[ RFC7231] ( https://datatracker.ietf.org/doc/html/rfc7231 ) .
@@ -534,9 +537,9 @@ The following examples provide guidance on how to deal with specific error cases
534
537
when using the ` application/graphql+json ` media type to encode the response
535
538
body:
536
539
537
- ##### Invalid request body or parsing failure
540
+ ##### Invalid parameters or parsing failure
538
541
539
- For example: ` NONSENSE ` , ` {"qeury": "{__typena `
542
+ For example a POST response body of ` NONSENSE ` or ` {"qeury": "{__typena ` .
540
543
541
544
Requests that do not constitute a well-formed GraphQL request should result in
542
545
status code ` 400 ` (Bad Request).
0 commit comments