Reputation: 141
I would like to save the GraphQL queries and query variables with the GraphQL playground. I would like to avoid losing the queries when clearing browser cache and avoid copy and pasting to share.
I have tried copy and pasting both the queries and query variables to a cloud file as a back up, which is at minimum two steps.
Is there a way to save these as query files so they can be backed up in source control?
Or to add a plugin that saves the queries for sharing with team members?
Upvotes: 14
Views: 2214
Reputation: 682
You can use a Chrome Browser Extension called Altair GraphQL Client. It will give you a Save option. You can save queries and query variables in collections.
We can export the collections to a file. The exported file will be a json file with agc extension. This file can be backed up in source control.
Upvotes: 1