@@ -818,6 +818,8 @@ of rules must be adhered to by every Object type in a GraphQL schema.
818818 characters {"__ "} (two underscores).
819819 2 . The argument must accept a type where {IsInputType(argumentType)}
820820 returns {true}.
821+ 3 . If specified, {defaultValue} must be compatible with {argumentType}
822+ as per the coercion rules for that type.
8218233 . An object type may declare that it implements one or more unique interfaces.
8228244 . An object type must be a super-set of all interfaces it implements:
823825 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
14661468is constructed with the following rules :
14671469
14681470* 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 .
14731477
14741478* If the value {null } was provided for an input object field , and the field 's
14751479 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
15261530 characters {"__" } (two underscores).
15271531 3. The input field must accept a type where {IsInputType (inputFieldType)}
15281532 returns {true }.
1533+ 4. If specified , {defaultValue } must be compatible with {inputFieldType } as
1534+ per the coercion rules for that type .
15291535
15301536
15311537### Input Object Extensions
0 commit comments