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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass context to localGraphQLDatasource for testing purposes #2821

Merged

Conversation

lgandecki
Copy link
Contributor

Great work with the federation/gateway!

I would like the context to be passed to the graphql execution function in the localGraphQLDataSource, the same way it is handled in the remoteGraphQLDataSource, this way I can build integration tests that do keep the required context during execution. Currently it is ignored, even though the process method receives it.

Since the change is so tiny I hope it won't be a difficult decision - is there any reason NOT to pass the context in this particular case?

Thanks!

@jbaxleyiii
Copy link
Contributor

@lgandecki This is a wonderful addition! Can you add this to the changelog and I'd love to get this shipped!

@lgandecki
Copy link
Contributor Author

Thanks @jbaxleyiii ! Changelog updated. ( I hope that was the way I was supposed to do it :) )

@jbaxleyiii jbaxleyiii merged commit b4c6642 into apollographql:master Jun 12, 2019
@jbaxleyiii
Copy link
Contributor

@lgandecki thank you so much for this PR! It'll be out asap in the next release!

abernix pushed a commit to apollographql/federation that referenced this pull request Sep 4, 2020
…ssContextToLocalDataStore

pass context to localGraphQLDatasource for testing purposes
Apollo-Orig-Commit-AS: apollographql/apollo-server@b4c6642
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants