Variables don't display for queries
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

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
@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 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.
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 https://github.com/apollographql/apollo-client-devtools/issues/462 if it gives any help.
I have a similar issue.
https://github.com/apollographql/apollo-client-devtools/issues/564
I also have a similar issue.
@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
@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.
@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?
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. 🙏
@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 https://github.com/apollographql/apollo-client-devtools/blob/a2e0fbe9f1feec222d78b70e7f2bb494288705b2/src/application/index.tsx#L134 is missing variables
@hwillson any insights for the above?
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.
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!