graphql / graphql/graphql.github.io
learn/execution resolver function - should mention signature is specific to js server
- Vorherrschende Sprache
- TypeScript
- Sterne
- 889
- Forks
- 1.5k
- Ø Merge
- 4 T. 12 Std.
- Gemergte PRs (30 T.)
- 21
Beschreibung
From https://github.com/graphql/graphql.github.io/blob/source/src/content/learn/Learn-Execution.md
> A resolver function receives four arguments
I suggest that this is changed to "This resolver function receives four arguments"
Given that the specifications [specifies](https://spec.graphql.org/June2018/#ResolveFieldValue())
> ResolveFieldValue(objectType, objectValue, fieldName, argumentValues)
Let resolver be the internal function provided by objectType for determining the resolved value of a field named fieldName.
Return the result of calling resolver, **providing objectValue and argumentValues.**
So although the resolver function with 4 arguments is specification-compliant a resolver function does not receive four arguments. Only the first two.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.