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

[bug] Devtools never appear if initial page does not contain an Apollo Client instance #1035

Open
alessbell opened this issue Jul 25, 2023 · 2 comments

Comments

@alessbell
Copy link
Member

Intended outcome:
When I navigate to a page that initializes Apollo Client in the browser, the devtools should appear even if Apollo Client is not detected in the browser when the initial page load occurs.

Actual outcome:
If you have an app that is purely server rendered initially, and navigate to a page that loads Apollo Client the devtools never appear. You need to refresh the browser from the page that loads Apollo on the client in order for devtools to appear.

How to reproduce the issue:
I reproduced this in the Next.js experimental repo's polls-demo example.

If you start on the homepage, /, which is a React Server Component and navigate to the client component page, Apollo Client devtools never appear.

If you refresh the client component page, they do appear:

CleanShot 2023-07-25 at 10 43 43

Desktop (please complete the following information):

  • OS: [e.g. iOS] Mac OS
  • Browser [e.g. chrome, safari] Arc
  • Browser version [e.g. 22] 1.0.1
  • Extension version [e.g. 3.0] 4.1.4
@vezaynk
Copy link

vezaynk commented Nov 15, 2023

My app has delayed initializing for the graphql client, and I can't get the devtools to work :(

@jerelmiller
Copy link
Member

Hey @vezaynk 👋

We just shipped 4.5.0 of the devtools that should provide some more help here. A few highlights:

  • Will always create the "Apollo" panel, regardless of whether it can find a client
  • When a client can't be found, a troubleshooting dialog is displayed. Here you can get tips on figuring out why it won't connect.
  • The troubleshooting dialog contains a "retry" button that should allow you to try connecting again.

Please give the new version a try and let us know if the changes help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants