Apollo-client-devtools: Variables don't display for queries

Created on 26 Apr 2021  路  9Comments  路  Source: apollographql/apollo-client-devtools

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
馃悶 bug 馃檹 help-wanted

All 9 comments

@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 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. 馃檹

Was this page helpful?
0 / 5 - 0 ratings