Skip to content

Commit 678105c

Browse files
committed
Clarify execution behavior of abstract types in Spec.
`CompleteValue` is missing reference to abstract type resolution. Thanks to @seanchas for the careful read and highlighting this issue.
1 parent c5b3b64 commit 678105c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

spec/Section 6 -- Execution.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ MergeSelectionSets(fields):
161161
* Return {selectionSet}.
162162

163163
CompleteValue(fieldType, result, subSelectionSet):
164-
165164
* If the {fieldType} is a Non-Null type:
166165
* Let {innerType} be the inner type of {fieldType}.
167166
* Let {completedResult} be the result of calling {CompleteValue(innerType, result)}.
@@ -179,7 +178,16 @@ CompleteValue(fieldType, result, subSelectionSet):
179178
* Return the result of "coercing" {result}, ensuring it is a legal value of
180179
{fieldType}, otherwise {null}.
181180
* If {fieldType} is an Object, Interface, or Union type:
182-
* Return the result of evaluating {subSelectionSet} on {fieldType} normally.
181+
* If {fieldType} is an Object type.
182+
* Let {objectType} be {fieldType}.
183+
* Otherwise if {fieldType} is an Interface or Union type.
184+
* Let {objectType} be ResolveAbstractType(fieldType, result).
185+
* Return the result of evaluating {subSelectionSet} on {objectType} normally.
186+
187+
ResolveAbstractType(abstractType, objectValue):
188+
* Return the result of calling the internal method provided by the type
189+
system for determining the Object type of {abstractType} given the
190+
value {objectValue}.
183191

184192
### Normal evaluation
185193

0 commit comments

Comments
 (0)