@@ -818,6 +818,8 @@ of rules must be adhered to by every Object type in a GraphQL schema.
818
818
characters {"__ "} (two underscores).
819
819
2 . The argument must accept a type where {IsInputType(argumentType)}
820
820
returns {true}.
821
+ 3 . If specified, {defaultValue} must be compatible with {argumentType}
822
+ as per the coercion rules for that type.
821
823
3 . An object type may declare that it implements one or more unique interfaces.
822
824
4 . An object type must be a super-set of all interfaces it implements:
823
825
1 . Let this object type be {objectType}.
@@ -1466,10 +1468,12 @@ defined by the input object type and for which a value exists. The resulting map
1466
1468
is constructed with the following rules :
1467
1469
1468
1470
* If no value is provided for a defined input object field and that field
1469
- definition provides a default value , the default value should be used . If no
1470
- default value is provided and the input object field 's type is non -null , an
1471
- error should be thrown . Otherwise , if the field is not required , then no entry
1472
- is added to the coerced unordered map .
1471
+ definition provides a default value , the result of coercing the default value
1472
+ according to the coercion rules of the input field type should be used (if
1473
+ this coercion would cause an infinite loop, a query error should be thrown).
1474
+ If no default value is provided and the input object field 's type is
1475
+ non -null , an error should be thrown . Otherwise , if the field is not required ,
1476
+ then no entry is added to the coerced unordered map .
1473
1477
1474
1478
* If the value {null } was provided for an input object field , and the field 's
1475
1479
type is not a non -null type , an entry in the coerced unordered map is given
@@ -1526,6 +1530,8 @@ Literal Value | Variables | Coerced Value
1526
1530
characters {"__" } (two underscores).
1527
1531
3. The input field must accept a type where {IsInputType (inputFieldType)}
1528
1532
returns {true }.
1533
+ 4. If specified , {defaultValue } must be compatible with {inputFieldType } as
1534
+ per the coercion rules for that type .
1529
1535
1530
1536
1531
1537
### Input Object Extensions
0 commit comments