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

History persistence seems to be broken since v1.3.5 #312

Closed
3 tasks done
vincenzo opened this issue Dec 4, 2017 · 10 comments
Closed
3 tasks done

History persistence seems to be broken since v1.3.5 #312

vincenzo opened this issue Dec 4, 2017 · 10 comments

Comments

@vincenzo
Copy link
Contributor

vincenzo commented Dec 4, 2017

This issue pertains to:

  • GraphQL Playground - Electron App
  • GraphQL Playground
  • GraphQL Playground Middleware

Don't have much time to write right now, but load up PG (>= v1.3.5 and <=1.3.6) somewhere and see how it doesn't save the history. I've observed this on two projects so far.

What should happen

  1. Go to any PG
  2. Run your queries
  3. The queries are saved in the history
  4. The queries are still there when you reopen the same PG on the same browser

What actually happens

...
...
4. The queries are no longer there when you reopen the same PG on the same browser

How to replicate

Get a PG (>= v1.3.5 and <=1.3.6) up and running in any project (my favourite is to create a new one with graphql-yoga). I tried also on https://www.graphqlbin.com/Agjcr and it breaks there, too. When I open it, there's a history available there already (not from me), but any new queries do not persist.

@sorenbs
Copy link

sorenbs commented Dec 4, 2017

It seems to work here https://www.graphqlbin.com/Agjcr

I'm unsure if this is version 1.3.5 though. @timsuchanek we should add the version number in the UI somewhere :-)

@vincenzo
Copy link
Contributor Author

vincenzo commented Dec 4, 2017

@sorenbs Thanks. Could you try and build a quick project off graphql-yoga?

PS: yes, the version number in the UI is a very good idea.

@morajabi
Copy link
Collaborator

morajabi commented Dec 5, 2017

@vincenzo @sorenbs Made an issue and will tackle this later: #314 Good suggestion 😉

@vincenzo
Copy link
Contributor Author

vincenzo commented Dec 5, 2017

Thanks @morajabi.

Btw @sorenbs @timsuchanek, I'll update the description with a clearer description.

@vincenzo vincenzo changed the title History seems to be broken in Playground 1.3.5 History seems to be broken since v1.3.5 Dec 5, 2017
@vincenzo
Copy link
Contributor Author

vincenzo commented Dec 5, 2017

The only place in the codebase where I can see saveHistory() has been commented out is here.

Going by the codebase, I understood that saveHistory() is also called when a query is shared, so I tried sharing, and indeed the history is saved permanently. The previous behaviour I had (which was when I had installed middleware-express 1.3.1) was that running the query and then closing the window where PG was running was enough for the history to be saved. Now it's not doing it and I can only put it down to the commented out code I linked above.

Thoughts?

@vincenzo
Copy link
Contributor Author

vincenzo commented Dec 5, 2017

This is the commit that introduced that change: a43266e - It doesn't seem like something that was actually meant? I can't see the relation with the rest of the change in that commit.

@vincenzo vincenzo changed the title History seems to be broken since v1.3.5 History persistence seems to be broken since v1.3.5 Dec 5, 2017
@vincenzo
Copy link
Contributor Author

vincenzo commented Dec 6, 2017

@sorenbs @timsuchanek Any feedback on whether or not my findings are actually relevant to the issue at hand?

@vincenzo
Copy link
Contributor Author

vincenzo commented Dec 8, 2017

@kbrandwijk Maybe you have an opinion about this one? I am trying to restore this functionality.

@vincenzo
Copy link
Contributor Author

Anyone looking at this or #317?

@schickling
Copy link
Collaborator

This should be fixed in 1.3.10 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants