Apollo-client-devtools: Add saving/restoring GraphiQL queries

Created on 16 Jan 2017  路  7Comments  路  Source: apollographql/apollo-client-devtools

Enhancement proposal: It would be highly useful to be able to:

  • save current GraphiQL query with variables, with editable save-name defaulting to given query/mutation name
  • list saved queries for current endpoint, sorted by date from newest, or by save-name
  • load selected saved query in the list
  • delete selected saved query in the list
  • rename selected saved query in the list
  • save loaded and updated query with variables
  • save loaded and updated query with variables under new name (keeping the old save intact)
  • rename the currently saved/loaded query
  • optionally import/export saved queries for current endpoint
馃崻 feature-request

Most helpful comment

This is a great idea! I think we can put those in localStorage, I'd be happy to accept a PR for this feature.

I think just the first 4 would be a good starting point:

  • save current GraphiQL query with variables, with editable save-name defaulting to given query/mutation name
  • list saved queries for current endpoint, sorted by date from newest, or by save-name
  • load selected saved query in the list
  • delete selected saved query in the list

Let me know if you would like to work on this, and if I can help!

All 7 comments

This is a great idea! I think we can put those in localStorage, I'd be happy to accept a PR for this feature.

I think just the first 4 would be a good starting point:

  • save current GraphiQL query with variables, with editable save-name defaulting to given query/mutation name
  • list saved queries for current endpoint, sorted by date from newest, or by save-name
  • load selected saved query in the list
  • delete selected saved query in the list

Let me know if you would like to work on this, and if I can help!

Why not simply leverage graphiql-workspace ? It provides pretty much all of the above and more:

graphiql-workspace

@stubailo what do you think ?

Any feedback on leveraging graphiql-workspace guys ? Thanks.

@tlvenn that seems like a great idea to me!

I think this is a good idea, but it seems like a lot of the UI from that screenshot isn't necessary in the devtools, specifically the stuff with URL/headers.

Was this page helpful?
0 / 5 - 0 ratings