@@ -10,71 +10,71 @@ the case that any _field error_ was raised on a field and was replaced with
1010
1111## Response Format
1212
13- A GraphQL request returns either a _ response _ or a _ response stream_ .
13+ :: A GraphQL _ response _ is either a _ response map _ or a _ response stream_ .
1414
15- ### Response
15+ ### Response Map
1616
17- :: A GraphQL request returns a _ response _ when the GraphQL operation is a query
18- or mutation. A _ response _ must be a map.
17+ :: A GraphQL request returns a _ response map _ when the GraphQL operation is a
18+ query or mutation. A _ response map _ must be a map.
1919
20- If the request raised any errors, the response map must contain an entry with
20+ If the request raised any errors, the _ response map _ must contain an entry with
2121key ` errors ` . The value of this entry is described in the "Errors" section. If
2222the request completed without raising any errors, this entry must not be
2323present.
2424
25- If the request included execution, the response map must contain an entry with
25+ If the request included execution, the _ response map _ must contain an entry with
2626key ` data ` . The value of this entry is described in the "Data" section. If the
2727request failed before execution, due to a syntax error, missing information, or
2828validation error, this entry must not be present.
2929
30- The response map may also contain an entry with key ` extensions ` . This entry, if
31- set, must have a map as its value. This entry is reserved for implementers to
30+ The _ response map _ may also contain an entry with key ` extensions ` . This entry,
31+ if set, must have a map as its value. This entry is reserved for implementers to
3232extend the protocol however they see fit, and hence there are no additional
3333restrictions on its contents.
3434
3535To ensure future changes to the protocol do not break existing services and
36- clients, the top level response map must not contain any entries other than the
37- three described above.
36+ clients, the top level _ response map _ must not contain any entries other than
37+ the three described above.
3838
39- Note: When ` errors ` is present in the response , it may be helpful for it to
40- appear first when serialized to make it more clear when errors are present in a
41- response during debugging.
39+ Note: When ` errors ` is present in the _ response map _ , it may be helpful for it
40+ to appear first when serialized to make it more clear when errors are present in
41+ a _ response map _ during debugging.
4242
4343### Response Stream
4444
4545:: A GraphQL request returns a _ response stream_ when the GraphQL operation is a
46- subscription. A _ response stream_ must be a stream of _ response _ .
46+ subscription. A _ response stream_ must be a stream of _ response map _ .
4747
4848### Data
4949
50- The ` data ` entry in the response will be the result of the execution of the
51- requested operation. If the operation was a query, this output will be an object
52- of the query root operation type; if the operation was a mutation, this output
53- will be an object of the mutation root operation type.
50+ The ` data ` entry in the _ response map _ will be the result of the execution of
51+ the requested operation. If the operation was a query, this output will be an
52+ object of the query root operation type; if the operation was a mutation, this
53+ output will be an object of the mutation root operation type.
5454
5555If an error was raised before execution begins, the ` data ` entry should not be
56- present in the response .
56+ present in the _ response map _ .
5757
58- If an error was raised during the execution that prevented a valid response , the
59- ` data ` entry in the response should be ` null ` .
58+ If an error was raised during the execution that prevented a valid result , the
59+ ` data ` entry in the _ response map _ should be ` null ` .
6060
6161### Errors
6262
63- The ` errors ` entry in the response is a non-empty list of errors raised during
64- the _ request_ , where each error is a map of data described by the error result
65- format below.
63+ The ` errors ` entry in the _ response map _ is a non-empty list of errors raised
64+ during the _ request_ , where each error is a map of data described by the error
65+ result format below.
6666
67- If present, the ` errors ` entry in the response must contain at least one error.
68- If no errors were raised during the request, the ` errors ` entry must not be
69- present in the response .
67+ If present, the ` errors ` entry in the _ response map _ must contain at least one
68+ error. If no errors were raised during the request, the ` errors ` entry must not
69+ be present in the _ response map _ .
7070
71- If the ` data ` entry in the response is not present, the ` errors ` entry must be
72- present. It must contain at least one _ request error_ indicating why no data was
73- able to be returned.
71+ If the ` data ` entry in the _ response map _ is not present, the ` errors ` entry
72+ must be present. It must contain at least one _ request error_ indicating why no
73+ data was able to be returned.
7474
75- If the ` data ` entry in the response is present (including if it is the value
76- {null}), the ` errors ` entry must be present if and only if one or more _ field
77- error_ was raised during execution.
75+ If the ` data ` entry in the _ response map _ is present (including if it is the
76+ value {null}), the ` errors ` entry must be present if and only if one or more
77+ _ field error_ was raised during execution.
7878
7979** Request Errors**
8080
@@ -85,7 +85,7 @@ to determine which operation to execute, or invalid input values for variables.
8585
8686A request error is typically the fault of the requesting client.
8787
88- If a request error is raised, the ` data ` entry in the response must not be
88+ If a request error is raised, the ` data ` entry in the _ response map _ must not be
8989present, the ` errors ` entry must include the error, and request execution should
9090be halted.
9191
@@ -99,8 +99,8 @@ A field error is typically the fault of a GraphQL service.
9999
100100If a field error is raised, execution attempts to continue and a partial result
101101is produced (see [ Handling Field Errors] ( #sec-Handling-Field-Errors ) ). The
102- ` data ` entry in the response must be present. The ` errors ` entry should include
103- this error.
102+ ` data ` entry in the _ response map _ must be present. The ` errors ` entry should
103+ include this error.
104104
105105** Error Result Format**
106106
0 commit comments