graphql / graphql-playground

🎮 GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)
MIT License
8.76k stars 734 forks source link

Save / Load workspace #727

Open nicolas-besnard opened 6 years ago

nicolas-besnard commented 6 years ago

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?

einaralex commented 6 years ago

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

BenHizak commented 6 years ago

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

gihrig commented 5 years ago

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

Jayphen commented 5 years ago

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

joelgetaction commented 5 years ago

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 ...

gihrig commented 5 years ago

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

joelgetaction commented 5 years ago

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 ... :-)

gihrig commented 5 years ago

@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.

avocadoslab commented 5 years ago

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)

bbkillen commented 5 years ago

I have this issue.

toddgower-hiatus commented 5 years ago

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

bezoar17 commented 5 years ago

Issue is still present in Version 1.8.10 (1.8.10.5129)

jboehle commented 5 years ago

Related to #749?

joseluisq commented 5 years ago

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

bostrom commented 5 years ago

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. 😞

webberwang commented 5 years ago

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

alistra commented 5 years ago

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

willmcpo commented 5 years ago

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.

prantlf commented 5 years ago

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

nomadinjax commented 5 years ago

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. :)

clutch-justin commented 4 years ago

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

iamshreeram commented 3 years ago

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

austinjhunt commented 2 years ago

Having the same issue here.

theskillwithin commented 2 years ago

any progress on this?

ddbhagat commented 2 years ago

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?

JESii commented 2 years ago

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.

roryfahy commented 1 year ago

any recommendations for a good alternative?

toddgower-hiatus commented 1 year ago

any recommendations for a good alternative?

Apollo Studio