Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide GraphQLContext and ResolveInfo in Federated Entity Resolvers #2482

Open
Maxwell2022 opened this issue Dec 8, 2023 · 1 comment
Open
Labels
enhancement A feature or improvement

Comments

@Maxwell2022
Copy link

Maxwell2022 commented Dec 8, 2023

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.

image

Steps to reproduce

Lighthouse Version

latest master branch

@spawnia spawnia changed the title [bug] Missing GraphQL context in Federated Entity Resolvers Missing GraphQL context in Federated Entity Resolvers Dec 11, 2023
@spawnia
Copy link
Collaborator

spawnia commented Dec 11, 2023

Please refrain from calling missing features bugs or categorizing them as such. According to the Lighthouse documentation, entity resolvers only receive a single argument:

This has worked fine so far, what you are asking for is an additional feature.

It seems like a reasonable addition to provide this readily available information and behave more similar to Apollo. I am open to pull requests.

@spawnia spawnia added the enhancement A feature or improvement label Dec 11, 2023
@spawnia spawnia changed the title Missing GraphQL context in Federated Entity Resolvers Provide GraphQLContext and ResolveInfo in Federated Entity Resolvers Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature or improvement
Projects
None yet
Development

No branches or pull requests

2 participants