Skip to content

Commit 29e112c

Browse files
committed
enhance(ResolveFieldValue): add async collection language
and some baseline collection language for comparison extracted from #742 Authored-by: Rob Richard <[email protected]>
1 parent 56d6107 commit 29e112c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

spec/Section 6 -- Execution.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,12 @@ As an example, this might accept the {objectType} `Person`, the {field}
650650
{"soulMate"}, and the {objectValue} representing John Lennon. It would be
651651
expected to yield the value representing Yoko Ono.
652652

653+
List values are resolved similarly. For example, {ResolveFieldValue} might also
654+
accept the {objectType} `MusicBand`, the {field} {"members"}, and the
655+
{objectValue} representing the Beatles. It would be expected to yield a
656+
collection of values representing John Lennon, Paul McCartney, Ringo Starr and
657+
George Harrison.
658+
653659
ResolveFieldValue(objectType, objectValue, fieldName, argumentValues):
654660

655661
- Let {resolver} be the internal function provided by {objectType} for
@@ -660,7 +666,8 @@ ResolveFieldValue(objectType, objectValue, fieldName, argumentValues):
660666
Note: It is common for {resolver} to be asynchronous due to relying on reading
661667
an underlying database or networked service to produce a value. This
662668
necessitates the rest of a GraphQL executor to handle an asynchronous execution
663-
flow.
669+
flow. In addition, an implementation for collections may leverage asynchronous
670+
iterators or asynchronous generators provided by many programming languages.
664671

665672
### Value Completion
666673

0 commit comments

Comments
 (0)