apollographql / apollographql/apollo-client-devtools

Variables don't display for queries

Open
#539 13 comments 10 reactions 0 assignees View on GitHub
🐞 bug 🙏 help-wanted 2021-09
Dominant language
TypeScript
Stars
1.5k
Forks
172
Avg merge
10m
Merged PRs (30d)
8

Description

**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](https://user-images.githubusercontent.com/31106469/116109725-4b9d1380-a672-11eb-8659-585b7ec44919.png)

### 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

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue from the Network tab using the provided query and variables, then inspect the active queries inspector in Apollo dev tools. Compare the displayed variables for the query with the working mutation behavior; done means query variables such as id are shown instead of an empty object.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.