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

Corrected ApolloClient.queryManager typing as it may be undefined #3661

Merged
merged 5 commits into from
Aug 2, 2018

Conversation

danilobuerger
Copy link
Contributor

@danilobuerger danilobuerger commented Jul 5, 2018

Found in apollographql/react-apollo#2164 that ApolloClient.queryManager can actually be undefined as it is lazily initialised. This PR corrects the typing to reflect this. I chose to model initQueryManager after initProxy as this pattern was already being used. I also considered adding a getter for queryManager to initialise it whenever called, but rejected it to keep the pattern of actively having to init the QueryManager.

// cc @rosskevin

@apollo-cla
Copy link

apollo-cla commented Jul 5, 2018

Warnings
⚠️

There are library changes, but not tests. That's OK as long as you're refactoring existing code

Generated by 🚫 dangerJS

@danilobuerger
Copy link
Contributor Author

@hwillson could you take a look at this please? I resolved all conflicts, again, it would be nice to get this merged.

Copy link
Member

@hwillson hwillson left a comment

Choose a reason for hiding this comment

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

This looks great @danilobuerger - thanks very much!

@hwillson hwillson merged commit c100385 into apollographql:master Aug 2, 2018
@danilobuerger danilobuerger deleted the undefined branch January 17, 2019 18:08
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 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

4 participants