Provide `GraphQLContext` and `ResolveInfo` in Federated Entity Resolvers
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.5k
- Forks
- 468
- Avg merge
- 3h 9m
- Merged PRs (30d)
- 2
Description
Firstly just wanted to acknowledge the great work that was done recently to push for Federation 2 support and Federated tracing! 🙏👏
Describe the bug
It seems the GraphQLContext and the ResolveInfo are not injected in the Entity resolver for federated graphs.
Expected behavior/Solution
According to Apollo Documentation (Apollo Server), the Entity resolver should receive few arguments along side the entity representation.
Steps to reproduce
- Only
representationsis injected in BatchEntityResolver->_invoke() - Only
representationsis injected in EntityResolver->_invoke()
Lighthouse Version
latest master branch
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/Federation/Resolvers/Entities.php at BatchEntityResolver->_invoke() and EntityResolver->_invoke(), where the issue reports that only representations are passed. Compare the entity resolver arguments described in the linked Apollo documentation and inspect the surrounding resolver flow. Done means federated entity resolvers receive the requested context and resolve-info arguments alongside representations, with coverage for both resolver paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 40/100