diff --git a/spec/Section 3 -- Type System.md b/spec/Section 3 -- Type System.md index 17b098e44..5ef39adf6 100644 --- a/spec/Section 3 -- Type System.md +++ b/spec/Section 3 -- Type System.md @@ -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 @@ -805,13 +805,13 @@ 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, otherwise an error should be thrown. This unordered map should not contain +map, otherwise a query error should be thrown. This 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. +otherwise a query error should be thrown. If any non-nullable fields defined by the input object do not have corresponding entries in the original value, were provided a variable for which a value was -not provided, or for which the value {null} was provided, an error should +not provided, or for which the value {null} was provided, a query error should be thrown. The result of coercion is an environment-specific unordered map defining slots @@ -840,12 +840,12 @@ Original Value | Variables | Coerced Value ----------------------- | --------------- | ----------------------------------- `{ a: "abc", b: 123 }` | {null} | `{ a: "abc", b: 123 }` `{ a: 123, b: "123" }` | {null} | `{ a: "123", b: 123 }` -`{ a: "abc" }` | {null} | Error: Missing required field {b} -`{ a: "abc", b: null }` | {null} | Error: {b} must be non-null. +`{ a: "abc" }` | {null} | Query error: Missing required field {b} +`{ a: "abc", b: null }` | {null} | Query error: {b} must be non-null. `{ a: null, b: 1 }` | {null} | `{ a: null, b: 1 }` `{ b: $var }` | `{ var: 123 }` | `{ b: 123 }` -`{ b: $var }` | `{}` | Error: Missing required field {b}. -`{ b: $var }` | `{ var: null }` | Error: {b} must be non-null. +`{ b: $var }` | `{}` | Query error: Missing required field {b}. +`{ b: $var }` | `{ var: null }` | Query error: {b} must be non-null. `{ a: $var, b: 1 }` | `{ var: null }` | `{ a: null, b: 1 }` `{ a: $var, b: 1 }` | `{}` | `{ b: 1 }` diff --git a/spec/Section 5 -- Validation.md b/spec/Section 5 -- Validation.md index ad7d767fc..2ef4d48af 100644 --- a/spec/Section 5 -- Validation.md +++ b/spec/Section 5 -- Validation.md @@ -953,7 +953,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 { diff --git a/spec/Section 6 -- Execution.md b/spec/Section 6 -- Execution.md index b6f5f1b6b..68faca69a 100644 --- a/spec/Section 6 -- Execution.md +++ b/spec/Section 6 -- Execution.md @@ -698,5 +698,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}. diff --git a/spec/Section 7 -- Response.md b/spec/Section 7 -- Response.md index 68fd0ca79..61d9433ba 100644 --- a/spec/Section 7 -- Response.md +++ b/spec/Section 7 -- Response.md @@ -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