Skip to content

Commit 145c560

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 4a16446 commit 145c560

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
@@ -663,6 +663,12 @@ As an example, this might accept the {objectType} `Person`, the {field}
663663
{"soulMate"}, and the {objectValue} representing John Lennon. It would be
664664
expected to yield the value representing Yoko Ono.
665665

666+
List values are resolved similarly. For example, {ResolveFieldValue} might also
667+
accept the {objectType} `MusicBand`, the {field} {"members"}, and the
668+
{objectValue} representing the Beatles. It would be expected to yield a
669+
collection of values representing John Lennon, Paul McCartney, Ringo Starr and
670+
George Harrison.
671+
666672
ResolveFieldValue(objectType, objectValue, fieldName, argumentValues):
667673

668674
- Let {resolver} be the internal function provided by {objectType} for
@@ -673,7 +679,8 @@ ResolveFieldValue(objectType, objectValue, fieldName, argumentValues):
673679
Note: It is common for {resolver} to be asynchronous due to relying on reading
674680
an underlying database or networked service to produce a value. This
675681
necessitates the rest of a GraphQL executor to handle an asynchronous execution
676-
flow.
682+
flow. In addition, an implementation for collections may leverage asynchronous
683+
iterators or asynchronous generators provided by many programming languages.
677684

678685
### Value Completion
679686

0 commit comments

Comments
 (0)