Skip to content

Commit 7e02f5a

Browse files
committed
Clearer wording of oneof coercion rule
1 parent dca3826 commit 7e02f5a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

spec/Section 3 -- Type System.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,8 +1595,13 @@ is constructed with the following rules:
15951595
definition does not provide a default value, the input object field
15961596
definition's default value should be used.
15971597

1598-
* If the input object is a oneof input object, the map must contain exactly one
1599-
entry, and the value of that entry must not be {null}.
1598+
* If the input object is a Oneof Input Object:
1599+
1600+
* If the coerced unordered map does not contain exactly one entry, an error
1601+
must be thrown.
1602+
1603+
* If the value of the single entry in the coerced unordered map is {null}, an
1604+
error must be thrown.
16001605

16011606
Following are examples of input coercion for an input object type with a
16021607
`String` field `a` and a required (non-null) `Int!` field `b`:

0 commit comments

Comments
 (0)