Skip to content

Commit 128807c

Browse files
committed
Simplify and clarify OneOf Input Object additional coercion rules
1 parent 0f19c3e commit 128807c

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

spec/Section 3 -- Type System.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,16 +1707,12 @@ is constructed with the following rules:
17071707
Further, if the input object is a _OneOf Input Object_, the following additional
17081708
rules apply:
17091709

1710-
- If the input object literal or unordered map does not contain exactly one
1711-
entry a _request error_ must be raised.
1710+
- Prior to coercion of the input object literal, if the literal does not contain
1711+
exactly one entry, or if the value of this single entry is the {null} literal,
1712+
a _request error_ must be raised.
17121713

1713-
- Within the input object literal or unordered map, if the single entry is the
1714-
{null} literal or {null} a _request error_ must be raised.
1715-
1716-
- If the coerced unordered map does not contain exactly one entry a _request
1717-
error_ must be raised.
1718-
1719-
- If the value of the single entry in the coerced unordered map is {null} a
1714+
- After coercion a the input object, if the resulting coerced unordered map does
1715+
not contain exactly one entry, or if this single entry has the value {null}, a
17201716
_request error_ must be raised.
17211717

17221718
Following are examples of input coercion for an input object type with a

0 commit comments

Comments
 (0)