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

GraphiQL no longer persists Variables/Headers after closing tab #2650

Open
kylestlb opened this issue Apr 5, 2023 · 2 comments
Open

GraphiQL no longer persists Variables/Headers after closing tab #2650

kylestlb opened this issue Apr 5, 2023 · 2 comments
Assignees
Labels
kind/bug stage/3-local-solution A user has possible solution that solves the issue

Comments

@kylestlb
Copy link

kylestlb commented Apr 5, 2023

Describe the bug

The state in the graphiql playground for Variables and Headers tab no longer persists thru browser sessions. This is a slight annoyance as I like to store csrf tokens, etc there while developing & debugging

Your Example Website or App

n/a

Steps to Reproduce the Bug or Issue

To repro:

  • Open graphiql that ships with latest version of yoga
  • Put something in headers sub-tab
  • Close browser tab/window for this session
  • Go back to api playground and see that Headers tab is now blank

Expected behavior

I expected the headers info to persist across sessions, as it used to with old versions of yoga

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome 111.0.5563.146
  • Yoga: latest

Additional context

No response

@EmrysMyrddin EmrysMyrddin added stage/2-failing-test A failing test was created that describes the issue kind/bug labels Oct 31, 2023
@Akryum
Copy link
Contributor

Akryum commented Dec 6, 2023

There is a prop shouldPersistHeaders which is false by default. It should probably changed in the yoga graphiql package?

See:

@EmrysMyrddin EmrysMyrddin added stage/3-local-solution A user has possible solution that solves the issue and removed stage/2-failing-test A failing test was created that describes the issue labels Dec 11, 2023
@EmrysMyrddin
Copy link
Collaborator

EmrysMyrddin commented Dec 11, 2023

Hi @kylestlb and thank you for the report

Sorry but I'm not adding a lot here but just labeling it according to our new Contribution Guide and issue flow.

It seems already got into stage 3 thanks to @Akryum who found a working solution, that is a huge push for us!

The next stage 4 phase is about actually implement this solution in a PR.
If anyone wants to help, check out the instructions here on how to clone the repo and gradually become aware of the internal codebase.

We would love to help with any questions you might have!

Thank you and sorry that this comment is not a complete solution (yet).

This was referenced May 7, 2024
This was referenced May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug stage/3-local-solution A user has possible solution that solves the issue
Projects
None yet
Development

No branches or pull requests

4 participants