Skip to content

Commit 43bfd85

Browse files
committed
Editorial recommendations from @glasser
1 parent cae4baa commit 43bfd85

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

spec/GraphQLOverHTTP.md

+15-12
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ included in the GraphQL-over-HTTP {request}, they are handled by the {server}
234234
based on the URL used.
235235

236236
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.
240240

241241
Note: Depending on the serialization format used, values of the aforementioned
242242
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
246246
values for optional request parameters is equivalent to not specifying them at
247247
all.
248248

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.
250251

251252
## Accept
252253

@@ -280,8 +281,10 @@ The `query` parameter MUST be the string representation of the Source Text of
280281
the Document as specified in
281282
[the Language section of the GraphQL specification](https://spec.graphql.org/draft/#sec-Language).
282283

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.
285288

286289
### Example
287290

@@ -391,10 +394,10 @@ And the body:
391394

392395
# Response
393396

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.
398401

399402
A server must comply with
400403
[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
552555
when using the `application/graphql+json` media type to encode the response
553556
body:
554557

555-
##### Invalid request body or parsing failure
558+
##### Invalid parameters or parsing failure
556559

557-
For example: `NONSENSE`, `{"qeury": "{__typena`
560+
For example a POST response body of `NONSENSE` or `{"qeury": "{__typena`.
558561

559562
Requests that do not constitute a well-formed GraphQL request should result in
560563
status code `400` (Bad Request).

0 commit comments

Comments
 (0)