@@ -644,23 +644,27 @@ must only allow usage of variables of appropriate types.
644
644
While nearly all of GraphQL execution can be described generically, ultimately
645
645
the internal system exposing the GraphQL interface must provide values. This is
646
646
exposed via {ResolveFieldValue}, which produces a value for a given field on a
647
- type for a real value.
647
+ type for a real value. As an example, this might accept the {objectType}
648
+ ` Person ` , the {field} {"soulMate"}, and the {objectValue} representing John
649
+ Lennon. It would be expected to yield the value representing Yoko Ono.
648
650
649
- As an example, this might accept the {objectType} ` Person ` , the {field}
650
- {"soulMate"}, and the {objectValue} representing John Lennon. It would be
651
- expected to yield the value representing Yoko Ono.
651
+ List values are resolved similarly. For example, {ResolveFieldValue} might also
652
+ accept the {objectType} ` MusicBand ` , the {field} {"members"}, and the
653
+ {objectValue} representing the Beatles. It would be expected to yield a
654
+ collection of values representing John Lennon, Paul McCartney, Ringo Starr and
655
+ George Harrison.
652
656
653
657
ResolveFieldValue(objectType, objectValue, fieldName, argumentValues):
654
658
655
659
- Let {resolver} be the internal function provided by {objectType} for
656
660
determining the resolved value of a field named {fieldName}.
657
661
- Return the result of calling {resolver}, providing {objectValue} and
658
- {argumentValues}.
659
-
660
- Note: It is common for {resolver} to be asynchronous due to relying on reading
661
- an underlying database or networked service to produce a value. This
662
- necessitates the rest of a GraphQL executor to handle an asynchronous execution
663
- flow .
662
+ {argumentValues}. Note: It is common for {resolver} to be asynchronous due to
663
+ relying on reading an underlying database or networked service to produce a
664
+ value. This necessitates the rest of a GraphQL executor to handle an
665
+ asynchronous execution flow. In addition, an implementation for collections
666
+ may leverage asynchronous iterators or asynchronous generators provided by
667
+ many programming languages .
664
668
665
669
### Value Completion
666
670
0 commit comments