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

Fix double instantiation of DataSources #3388

Merged
merged 7 commits into from
Oct 9, 2019
Merged

Conversation

trevor-scheer
Copy link
Member

Currently, buildService is being called twice for each service on
gateway startup. While we are caching the datasources,
we're failing to utilize the cache.

This commit places the creation and caching of datasources in one
place, and indicates this more clearly with an updated function
name.

Fixes #3367

Currently, buildService is being called twice for each service on
gateway startup. This is because we're caching the datasources,
but failing to utilize the cache.

This commit places the creation and caching of datasources in one
place, and indicates this more clearly with an updated function
name.
@trevor-scheer trevor-scheer requested a review from abernix October 8, 2019 15:19
Copy link
Member

@abernix abernix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link

@bwhitty bwhitty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 thank you!

@trevor-scheer trevor-scheer merged commit edbc829 into master Oct 9, 2019
@trevor-scheer trevor-scheer deleted the trevor/AS-3367 branch October 9, 2019 21:31
abernix pushed a commit to apollographql/federation that referenced this pull request Sep 4, 2020
…3388)

Currently, buildService is being called twice for each service on
gateway startup. This is because we're caching the datasources,
but failing to utilize the cache.

This commit places the creation and caching of datasources in one
place, and indicates this more clearly with an updated function
name.

Fixes apollographql/apollo-server#3367
Apollo-Orig-Commit-AS: apollographql/apollo-server@edbc829
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 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.

ApolloGateway: buildService() called twice for each serviceList item
3 participants