Skip to content

Commit 1d56b88

Browse files
IvanGoncharovleebyron
authored andcommitted
Clarify types of errors in spec text (#385)
* Clarify types of errors in spec text * Update Section 5 -- Validation.md
1 parent 0356f0c commit 1d56b88

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

spec/Section 3 -- Type System.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ the built-in scalar types should be omitted for brevity.
308308

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

313313
For example, a GraphQL server could be preparing a field with the scalar type
314314
`Int` and encounter a floating-point number. Since the server must not break the
@@ -1263,7 +1263,7 @@ type of an Object or Interface field.
12631263
**Input Coercion**
12641264

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

spec/Section 5 -- Validation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -973,9 +973,9 @@ referenced.
973973

974974
**Explanatory Text**
975975

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

980980
```graphql counter-example
981981
{

spec/Section 6 -- Execution.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,5 +716,6 @@ resolves to {null}, then the entire list must resolve to {null}.
716716
If the `List` type is also wrapped in a `Non-Null`, the field error continues
717717
to propagate upwards.
718718

719-
If all fields from the root of the request to the source of the error return
720-
`Non-Null` types, then the {"data"} entry in the response should be {null}.
719+
If all fields from the root of the request to the source of the field error
720+
return `Non-Null` types, then the {"data"} entry in the response should
721+
be {null}.

spec/Section 7 -- Response.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ operation if successful, and describes any errors encountered during the
66
request.
77

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

1111

1212
## Serialization Format

0 commit comments

Comments
 (0)