Skip to content

Commit f5e26e3

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 8fd0df3 commit f5e26e3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

spec/Section 6 -- Execution.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,12 @@ As an example, this might accept the {objectType} `Person`, the {field}
664664
{"soulMate"}, and the {objectValue} representing John Lennon. It would be
665665
expected to yield the value representing Yoko Ono.
666666

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

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

679686
### Value Completion
680687

0 commit comments

Comments
 (0)