Skip to content

Commit a5d7731

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 e546aac commit a5d7731

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

659+
List values are resolved similarly. For example, {ResolveFieldValue} might also
660+
accept the {objectType} `MusicBand`, the {field} {"members"}, and the
661+
{objectValue} representing the Beatles. It would be expected to yield a
662+
collection of values representing John Lennon, Paul McCartney, Ringo Starr and
663+
George Harrison.
664+
659665
ResolveFieldValue(objectType, objectValue, fieldName, argumentValues):
660666

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

671678
### Value Completion
672679

0 commit comments

Comments
 (0)