@@ -280,7 +280,7 @@ A GraphQL schema may describe that a field represents a list of another type;
280
280
the ` List ` type is provided for this reason, and wraps another type.
281
281
282
282
Similarly, the ` Non-Null ` type wraps another type, and denotes that the
283
- resulting value will never be {null} (and that an error cannot result in a
283
+ resulting value will never be {null} (and that a field error cannot result in a
284
284
{null} value).
285
285
286
286
These two types are referred to as "wrapping types"; non-wrapping types are
@@ -375,7 +375,8 @@ all built-in scalars must be omitted for brevity.
375
375
376
376
A GraphQL service, when preparing a field of a given scalar type, must uphold the
377
377
contract the scalar type describes, either by coercing the value or producing a
378
- field error if a value cannot be coerced or if coercion may result in data loss.
378
+ [ field error] ( #sec-Errors.Field-errors ) if a value cannot be coerced or if
379
+ coercion may result in data loss.
379
380
380
381
A GraphQL service may decide to allow coercing different internal types to the
381
382
expected return type. For example when coercing a field of type {Int} a boolean
@@ -399,7 +400,8 @@ information on the serialization of scalars in common JSON and other formats.
399
400
400
401
If a GraphQL service expects a scalar type as input to an argument, coercion
401
402
is observable and the rules must be well defined. If an input value does not
402
- match a coercion rule, a [ request error] ( #sec-Request-Errors ) must be raised.
403
+ match a coercion rule, a [ request error] ( #sec-Errors.Request-errors ) must be
404
+ raised (input values are validated before execution begins).
403
405
404
406
GraphQL has different constant literals to represent integer and floating-point
405
407
input values, and coercion rules may apply differently depending on which type
@@ -1516,8 +1518,8 @@ type of an Object or Interface field.
1516
1518
The value for an input object should be an input object literal or an unordered
1517
1519
map supplied by a variable , otherwise a request error must be raised . In either
1518
1520
case , the input object literal or unordered map must not contain any entries
1519
- with names not defined by a field of this input object type , otherwise an error
1520
- must be raised .
1521
+ with names not defined by a field of this input object type , otherwise a
1522
+ response error must be raised .
1521
1523
1522
1524
The result of coercion is an unordered map with an entry for each field both
1523
1525
defined by the input object type and for which a value exists . The resulting map
@@ -1632,12 +1634,12 @@ implementation.
1632
1634
1633
1635
If a list 's item type is nullable , then errors occurring during preparation or
1634
1636
coercion of an individual item in the list must result in a the value {null } at
1635
- that position in the list along with an error added to the response . If a list ' s
1636
- item type is non -null , an error occurring at an individual item in the list must
1637
- result in a field error for the entire list .
1637
+ that position in the list along with a field error added to the response .
1638
+ If a list ' s item type is non -null , a field error occurring at an individual item
1639
+ in the list must result in a field error for the entire list .
1638
1640
1639
- Note : For more information on the error handling process , see "Errors and
1640
- Non-Nullability" within the Execution section .
1641
+ Note : See [ Handling Field Errors ]( #sec-Handling-Field-Errors) for more about
1642
+ this behavior .
1641
1643
1642
1644
**Input Coercion**
1643
1645
0 commit comments