Skip to content

Commit

Permalink
Update Section 7 -- Response.md
Browse files Browse the repository at this point in the history
Remove "first" and "next" and include an explicit note about errors appearing first when serialized as a convenience.
  • Loading branch information
leebyron committed Nov 29, 2017
1 parent e048e83 commit 7b40390
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spec/Section 7 -- Response.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ objects in the response as unordered Maps and arrive at a valid value.

A response to a GraphQL operation must be a map.

If the operation encountered any errors, the response map must contain a first
If the operation encountered any errors, the response map must contain an
entry with key `errors`. The value of this entry is described in the "Errors"
section. If the operation completed without encountering any errors, this entry
must not be present.

If the operation included execution, the response map must contain a next entry
If the operation included execution, the response map must contain an entry
with key `data`. The value of this entry is described in the "Data" section. If
the operation failed before execution, due to a syntax error, missing
information, or validation error, this entry must not be present.
Expand All @@ -104,6 +104,9 @@ To ensure future changes to the protocol do not break existing servers and
clients, the top level response map must not contain any entries other than the
three described above.

Note: When `errors` is present in the response, it may be helpful for it to
appear first when serialized to make it more clear when errors are present
in a response during debugging.

### Data

Expand Down

0 comments on commit 7b40390

Please sign in to comment.