Skip to content

Commit

Permalink
Clarify types of errors in spec text
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Feb 6, 2018
1 parent 902f24c commit 71f2ab8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ a server must not include a type called `Int` and use it to represent

A GraphQL server, when preparing a field of a given scalar type, must uphold the
contract the scalar type describes, either by coercing the value or
producing an error.
producing a field error.

For example, a GraphQL server could be preparing a field with the scalar type
`Int` and encounter a floating-point number. Since the server must not break the
Expand Down Expand Up @@ -805,10 +805,10 @@ An input object is never a valid result.
**Input Coercion**

The value for an input object should be an input object literal or an unordered
map supplied by a variable, otherwise an error should be thrown. In either
map supplied by a variable, otherwise an query error should be thrown. In either
case, the input object literal or unordered map should not contain any entries
with names not defined by a field of this input object type, otherwise an error
should be thrown.
with names not defined by a field of this input object type, otherwise an query
error should be thrown.

The result of coercion is an unordered map with an entry for each field both
defined by the input object type and provided with a value. If the value {null}
Expand Down
2 changes: 1 addition & 1 deletion spec/Section 5 -- Validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ referenced.

Named fragment spreads must refer to fragments defined
within the document. If the target of a spread is
not defined, this is an error:
not defined, this is a validation error:

```graphql counter-example
{
Expand Down
5 changes: 3 additions & 2 deletions spec/Section 6 -- Execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -703,5 +703,6 @@ resolves to {null}, then the entire list must resolve to {null}.
If the `List` type is also wrapped in a `Non-Null`, the field error continues
to propagate upwards.

If all fields from the root of the request to the source of the error return
`Non-Null` types, then the {"data"} entry in the response should be {null}.
If all fields from the root of the request to the source of the field error
return `Non-Null` types, then the {"data"} entry in the response should
be {null}.
2 changes: 1 addition & 1 deletion spec/Section 7 -- Response.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ operation if successful, and describes any errors encountered during the
request.

A response may contain both a partial response as well as encountered errors in
the case that an error occurred on a field which was replaced with null.
the case that a field error occurred on a field which was replaced with null.


## Serialization Format
Expand Down

0 comments on commit 71f2ab8

Please sign in to comment.