@@ -89,8 +89,12 @@ CoerceVariableValues(schema, operation, variableValues):
89
89
* Let {value} be the value provided in {variableValues} for the
90
90
name {variableName}.
91
91
* If {hasValue} is not {true} and {defaultValue} exists (including {null}):
92
+ * If {defaultValue} cannot be coerced according to the input coercion
93
+ rules of {variableType}, throw a query error.
94
+ * Let {coercedDefaultValue} be the result of coercing {defaultValue} according to the
95
+ input coercion rules of {variableType}.
92
96
* Add an entry to {coercedValues} named {variableName} with the
93
- value {defaultValue }.
97
+ value {coercedDefaultValue }.
94
98
* Otherwise if {variableType} is a Non-Nullable type, and either {hasValue}
95
99
is not {true} or {value} is {null}, throw a query error.
96
100
* Otherwise if {hasValue} is true:
@@ -586,8 +590,12 @@ CoerceArgumentValues(objectType, field, variableValues):
586
590
name {variableName}.
587
591
* Otherwise, let {value} be {argumentValue}.
588
592
* If {hasValue} is not {true} and {defaultValue} exists (including {null}):
593
+ * If {defaultValue} cannot be coerced according to the input coercion
594
+ rules of {variableType}, throw a query error.
595
+ * Let {coercedDefaultValue} be the result of coercing {defaultValue} according to the
596
+ input coercion rules of {variableType}.
589
597
* Add an entry to {coercedValues} named {argumentName} with the
590
- value {defaultValue }.
598
+ value {coercedDefaultValue }.
591
599
* Otherwise if {argumentType} is a Non-Nullable type, and either {hasValue}
592
600
is not {true} or {value} is {null}, throw a field error.
593
601
* Otherwise if {hasValue} is true:
0 commit comments