graphql-playground icon indicating copy to clipboard operation
graphql-playground copied to clipboard

Save / Load workspace

Open nicolas-besnard opened this issue 7 years ago • 28 comments

I'm using graphql-playground for several projects, and I'd like to know if there's any plan to "persist" workspaces by given them a name, and saving specific queries under that workspace?

nicolas-besnard avatar Jun 07 '18 09:06 nicolas-besnard

You can specify your projects in .graphqlconfig, see more at https://github.com/prismagraphql/graphql-config

einaralex avatar Jun 08 '18 12:06 einaralex

Is there any way of saving tabs in the project folder? (tab name, query)

BenHizak avatar Oct 05 '18 15:10 BenHizak

Saving tab content used to just happen, even over whole computer restarts. Recently the playground no longer saves tab content and even looses all content periodically in the same session.

Prisma v1.18.0 node 10.12.0 Mac OS 10.11.6

gihrig avatar Oct 18 '18 08:10 gihrig

I have the same problem with all state resetting whenever I load the app on MacOS (10.14)

Jayphen avatar Oct 22 '18 11:10 Jayphen

I have the same problem. Also, save file does not work or do anything and queries are lost across app starts ... This makes it difficult to use GraphQLPlayground because I have to retype a bunch of queries each time ...

joelgetaction avatar Nov 02 '18 23:11 joelgetaction

These problems don't exist in the playground app. I have abandoned the web-based playground.

gihrig avatar Nov 03 '18 01:11 gihrig

Thanks @gihrig but I was using the playground app, installed from homebrew, the latest version. Trying to save, nothing happens, no save menu pops up, nothing. :-(

Could you walk me through how you save things? Are you creating a blank config file and launching from there or are you typing in queries and then saving somehow? This would help me a lot ... :-)

joelgetaction avatar Nov 03 '18 01:11 joelgetaction

@joelgetaction

I was using the playground app, installed from homebrew

Wow, that's strange. I hope my success ins't just "beginner's luck".

Since the web version lost all of my queries, all I did was:

  1. Install playground app, using homebrew
  2. I don't recall, but I probably had to enter my GraphQL end point URL
  3. Manually enter some queries
  4. Press CMD-S to save

Next time I opened Playground app I was presented with a splash screen where I can select a recent workspace, create a new workspace or select another URL Endpoint.

I have two existing workspace choices, both contain the same tabs?. My tabs are all as I have left them. History works as expected, shows all my recent queries and starred queries filter works too.

I have a basic graphqlconfig.yml in my project root. This is pretty much as created by prisma init, or was it graphql init? It's been a while...

Except for the ${env...} vars, it's pretty standard.

projects:
  app:
    schemaPath: src/schema.graphql
    extensions:
      endpoints:
        default: ${env:APP_HOST}
  database:
    schemaPath: src/generated/prisma.graphql
    extensions:
      prisma: database/prisma.yml
      endpoints:
        dev:
          url: ${env:PRISMA_ENDPOINT}
          headers:
            Authorization: Bearer ${env:GQL_AUTH_TOKEN}
      prepare-bundle: src/generated/database.graphql

Also, I have many files in ~/Library/Application Support/GraphQL Playground and .../graphql-ide.

image

I hope this helps, let me know how it goes.

gihrig avatar Nov 03 '18 05:11 gihrig

I'm still having issues with saving my tabs. Nothing happens when you press CMD+S. Also nothing relevant files shows up when I try to select workspace from folder.

I'm on Version 1.8.0 (1.8.0.4820)

avocadoslab avatar Nov 09 '18 03:11 avocadoslab

I have this issue.

bbkillen avatar Feb 22 '19 21:02 bbkillen

I'm also having trouble saving workspaces. Any updates on this?

toddgower-hiatus avatar Feb 23 '19 00:02 toddgower-hiatus

Issue is still present in Version 1.8.10 (1.8.10.5129)

bezoar17 avatar Feb 27 '19 12:02 bezoar17

Related to #749?

jboehle avatar Mar 26 '19 15:03 jboehle

The same problem I can not save changes in my .graphqlconfig file from the app. It is always overwritten by old ones changes.

joseluisq avatar Apr 05 '19 08:04 joseluisq

Same here. Whenever I restart the electron app all my previous tabs and history is gone and I start from scratch by entering my API URL. 😞

bostrom avatar Apr 11 '19 06:04 bostrom

Yeah being able to save / load workspace would allow switching to different projects much easily without losing configurations / data.

webberwang avatar May 06 '19 07:05 webberwang

I'm an iOS developer for my team and I want to save a configuration for an URL based workspace - from what I researched I can't use .graphqlconfig for this (as it requires a schema file).

It would be nice to have recently used workspaces on the startup instead of the current Examples

alistra avatar May 07 '19 08:05 alistra

Experiencing the above issues too.

I've come to the conclusion to not use GraphQL Playground to reliably store queries - even the Share button has gone (web/desktop app/graphqlbin).

It's best used as a nice IDE to do one-off queries (but don't trust it to store your whole collection of queries/mutations), which is unfortunate as it could really be something quite useful for the development flow if things worked as documented.

willmcpo avatar May 09 '19 21:05 willmcpo

Yes, this is a feature request related to the bug #749. I commented about it there.

prantlf avatar Aug 17 '19 10:08 prantlf

Is there any update on this issue? When I first started using the Electron App, it just saved all my tabs/queries so next time I opened the app, I could pick up where I left off. This no longer happens. In fact, each time I open the app, I get the tabs/queries that were saved several months ago, nothing recent. Kinda like its frozen in time now. :)

damonmiller513 avatar Sep 27 '19 12:09 damonmiller513

As a new user I'm extremely confused by this.

clutch-justin avatar May 11 '20 19:05 clutch-justin

Looks like every users are confused. Is there any settings or documentation for saving the files?

iamshreeram avatar Apr 06 '21 08:04 iamshreeram

Having the same issue here.

austinjhunt avatar Dec 13 '21 18:12 austinjhunt

any progress on this?

theskillwithin avatar Jan 29 '22 00:01 theskillwithin

Any updates here, seeing the issues as queries not getting saved.

Another issue not related to this exactly but on user experience- if I open too many tabs, then there is no good way to scroll to the last tab, I need to close earlier tabs and then see last one. No so good exeperience right? Why dont we simple brings tabs to new line instead of indefinite scroll?

ddbhagat avatar Jul 22 '22 11:07 ddbhagat

No progress for three years? Looks like this is pretty much a lost cause. I've had all these issues with the browser-based approach and the app. In addition, the update schema doesn't work so if I change the schema I have to start over with a new workspace and all the pain pointed out earlier. It's a nice app but appears to be abandoned, so I just copy/pasta into my own files.

JESii avatar Aug 01 '22 18:08 JESii

any recommendations for a good alternative?

roryfahy avatar Sep 09 '23 16:09 roryfahy

any recommendations for a good alternative?

Apollo Studio

toddgower-hiatus avatar Sep 11 '23 17:09 toddgower-hiatus