Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify types of errors in spec text #385

Merged
merged 3 commits into from
Apr 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ the built-in scalar types should be omitted for brevity.

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 @@ -1263,7 +1263,7 @@ type of an Object or Interface field.
**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 must be thrown. In either
map supplied by a variable, otherwise a query error must be thrown. In either
case, the input object literal or unordered map must not contain any entries
with names not defined by a field of this input object type, otherwise an error
must be thrown.
Expand Down
6 changes: 3 additions & 3 deletions spec/Section 5 -- Validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -973,9 +973,9 @@ referenced.

**Explanatory Text**

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

```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 @@ -716,5 +716,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