Skip to content

Commit 4ff4d7e

Browse files
committed
Merge pull request #108 from dylanahsmith/variable-coercion
Mention that variable values need to be coerced for execution.
2 parents 187d816 + ffbb14e commit 4ff4d7e

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

spec/Section 3 -- Type System.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -735,11 +735,11 @@ query withNullableVariable($var: String) {
735735
Hence, if the value for a Non Null type is hard-coded in the query, it is always
736736
coerced using the input coercion for the wrapped type.
737737

738-
When a Non Null input has its value set using a variable, the coerced value
739-
should be `null` if the provided value is `null`-like in the provided
740-
representation, or if the provided value is omitted. Otherwise, the coerced
741-
value is the result of running the wrapped type's input coercion on the
742-
provided value.
738+
When a Non Null input has its value set using a variable, a query
739+
error must be raised if the provided value is `null`-like in the
740+
provided representation, or if the provided value is omitted.
741+
Otherwise, the coerced value is the result of running the wrapped
742+
type's input coercion on the provided value.
743743

744744
## Directives
745745

spec/Section 6 -- Execution.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ error. If the operation is found, then the result of evaluating the request
1414
should be the result of evaluating the operation according to the “Evaluating
1515
operations” section.
1616

17+
## Coercing Variables
18+
19+
If the operation has defined any variables, then the values for
20+
those variables need to be coerced using the input coercion rules
21+
of variable's declared type. If a query error is encountered during
22+
input coercion of variable values, then the operation fails without
23+
execution.
24+
1725
## Evaluating operations
1826

1927
The type system, as described in the “Type System” part of the spec, must

0 commit comments

Comments
 (0)