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

Infer connectToDevTools regardless of whether another client has connected or not #11707

Closed
jerelmiller opened this issue Mar 20, 2024 · 2 comments · Fixed by #11969
Closed

Comments

@jerelmiller
Copy link
Member

The connectToDevTools option currently sets a default value based on whether __DEV__ is set and whether another client has already connected to devtools (by checking window.__APOLLO_CLIENT__). While this worked well for the old devtools registration mechanism, we now have the ability to register multiple clients with the new devtools registration mechanism. We can and should remove the check for window.__APOLLO_CLIENT__ to allow connectToDevTools to be inferred based on __DEV__, otherwise it presents confusion when the first client is automatically registered, but subsequent ones are not. To workaround this currently, you need to explicitly set connectToDevTools to true in order for other created clients to be registered.

Work is still underway to actually be able to switch between multiple clients in the devtools. This work should be accomplished some time after that.

Copy link
Contributor

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.

Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant