- Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
If you set initial headers and disable shouldPersistHeaders graphiql creates a new tab although it shouldn't
Tabs aren't stored with headers, but the getDefaultTabState function doesn't know about the shouldPersistHeaders flag. So it compares a stored tab without headers with the headers that are passed to graphiql and decides to create a new tab
Expected Behavior
Refreshing the page shouldn't create a new tab
Steps To Reproduce
In this repo edit the renderExample.js setting the var parameters = { headers: '{"foo": "bar"}' };and shouldPersistHeaders: false,
### Module pattern - [ ] graphiql-umd - [ ] graphiql-esm - [ ] graphiql-commonjs ### Environment _No response_ ### Anything else? _No response_ vitalikda, tcK1 and acao
Metadata
Metadata
Assignees
Type
Projects
Status
Todo