graphql / graphql/graphql.github.io

learn/execution resolver function - should mention signature is specific to js server

Open
#1,141 0 comments 0 reactions 0 assignees View on GitHub
✏️ Editorial
Dominant language
TypeScript
Stars
889
Forks
1.5k
Avg merge
4d 12h
Merged PRs (30d)
21

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.