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

Variables don't display for queries #539

Open
afrankel-sfdo opened this issue Apr 26, 2021 · 13 comments
Open

Variables don't display for queries #539

afrankel-sfdo opened this issue Apr 26, 2021 · 13 comments

Comments

@afrankel-sfdo
Copy link

afrankel-sfdo commented Apr 26, 2021

Intended outcome:

Any variables executed in a query should show in the active queries inspector.

Actual outcome:

Variables are always empty for queries. Mutations are fine.

How to reproduce the issue:

Network tab

{"operationName":"brandSettings","variables":{"id":123123},"query":"query brandSettings($id: Int!) {\n  organization(id: $id) {\n    id\n    orgSettings {\n      defaultLocale\n      __typename\n    }\n    brandSettings {\n      communityLogo\n      footerContent1\n      footerContent2\n      footerContent3\n      primaryColor\n      secondaryColor\n      localized {\n        language\n        communityLogo\n        footerContent1\n        footerContent2\n        footerContent3\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n}\n"}

Apollo dev tools

Screen Shot 2021-04-26 at 9 26 44 AM

Issue

network request shows variables":{"id":123123} but Apollo has root: {} 0 keys

Desktop

  • OS: macOS
  • Browser: Chrome 90.0.4430.85
  • Extension version: 3.0.4
  • Apollo client v2
@hwillson
Copy link
Member

hwillson commented Apr 30, 2021

@afrankel-sfdo I haven't been able to re-create this. Any chance you (or anyone else) could provide a reproduction (tested against 3.0.5)?

@afrankel-sfdo
Copy link
Author

@afrankel-sfdo I haven't been able to re-create this. Any chance you (or anyone else) could provide a reproduction (tested against 3.0.5)?

@hwillson is there an easy way to setup a public example apollo client/server app? My test case is private.

@jeffstedt
Copy link

Hi! First of all, thanks and good job releasing 3.0.5 @hwillson 🎉

Regarding this issue with query variables - I'm able to reproduce it too. I'm using the same client setup I used in #462 if it gives any help.

@axat17
Copy link

axat17 commented May 12, 2021

I have a similar issue.

#564

@kosmos
Copy link

kosmos commented May 14, 2021

I also have a similar issue.

@benatshippabo
Copy link

@hwillson I think the issue is when we use apollo client v2. See this example here: https://codesandbox.io/s/apollo-client-devtool-variables-94kn5

@afrankel-sfdo
Copy link
Author

@hwillson I think the issue is when we use apollo client v2. See this example here: https://codesandbox.io/s/apollo-client-devtool-variables-94kn5

That's also true for us, using v2.

@afrankel-sfdo
Copy link
Author

@hwillson can you remove needs-reproducation, we've determined the issues is related to Apollo v2. What else can we do to help move this along?

@hwillson
Copy link
Member

Thanks @afrankel-sfdo - the absolute best way to help move this along would be if someone is able to take a quick pass at creating a PR to fix this. We'll definitely get to it soon, but a PR would help expedite things for sure. 🙏

@afrankel-sfdo
Copy link
Author

afrankel-sfdo commented Jul 28, 2021

@hwillson traced the issue through dev tools, and far as I can tell it's a bug in the v2 client, not passing the variables correctly.

the query object here

variables: query.variables,
is missing variables

Screen Shot 2021-07-28 at 1 47 39 PM

@afrankel-sfdo
Copy link
Author

@hwillson any insights for the above?

@hwillson hwillson added the 2021-08 Milestone YYYY-MM label Aug 13, 2021
@hwillson hwillson added 2021-09 Milestone YYYY-MM and removed 2021-08 Milestone YYYY-MM labels Sep 9, 2021
@msell
Copy link

msell commented Oct 29, 2022

We also had this same issue, we are currently stuck on Apollo client 2x for the time being. What I ended up doing is just grabbing the last 2x version of apollo-client-devtools here and building it and installing this old version of the chrome extension. Once I have this old version the query variables show up again.

@benatshippabo
Copy link

We also had this same issue, we are currently stuck on Apollo client 2x for the time being. What I ended up doing is just grabbing the last 2x version of apollo-client-devtools here and building it and installing this old version of the chrome extension. Once I have this old version the query variables show up again.

Yes, that is what my team did as well. Eventually we did migrate to v3 and the migration was pretty painless!

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

No branches or pull requests

7 participants