fix: change default playground interface#319
Conversation
Previously, the default playground interface was set to `:playground` which uses graphql-playground. However, this uses a deprecated JavaScript API which means that it does not work on modern versions of chrome. It also seems that the library is no longer maintained, so the chances of this being fixed in a future release are slim. The result of this, is that tooltips do not disappear, making the application seem broken. Whilst this isn't a direct issue of this library, I think it gives a bad impression when things are broken out of the box. This commit changes the generated interface to graphiql (using the `:simple` interface). There is also an `:advanced` interface option, but that also points to an unmaintained library which didn't work out of the box. graphql/graphql-playground#1429
|
We've had some issues with this for a while, and I think even graphiql is really out of date isn't it? Is there maybe some way we can vendor into |
https://github.com/graphql/graphiql It seems to be reasonably active - the latest release was 2 days ago, however the absinthe_plug package is on a version from December 2024.
That's exactly how absinthe_plug does it. For example: |
|
Then perhaps we should just poke them to update graphiql 😂 With that said, it looks like there are also other issues w/ |
|
I believe that the |
|
🤔 AFAIK there are graphql playground tools that you can use and just point at an API, so maybe we should just encourage people to use those. Like this kind of thing: https://studio.apollographql.com/sandbox/explorer/? So maybe we should generate the code, commented out, link to a description of why you can use these but you should prefer some online explorer? Not sure. |
|
You can do something like that. It'll require CORS to be set up correctly to allow access though. I think you can embed apollo sandbox locally too, but that's no different to vendoring graphiql really. |
|
Ok, so the flaw with :simple is that currently headers aren't being sent to the server. absinthe-graphql/absinthe_plug#304 But it seems like there is a fix 🤷 |
|
🚀 Thank you for your contribution! 🚀 |
|
Thanks for the heads up, I'll check it out and make sure the screenshots are updated if necessary! |
Previously, the default playground interface was set to
:playgroundwhich uses graphql-playground. However, this uses a deprecated JavaScript API which means that it does not work on modern versions of chrome. It also seems that the library is no longer maintained, so the chances of this being fixed in a future release are slim.The result of this, is that tooltips do not disappear, making the application seem broken. Whilst this isn't a direct issue of this library, I think it gives a bad impression when things are broken out of the box.
This commit changes the generated interface to graphiql (using the
:simpleinterface). There is also an:advancedinterface option, but that also points to an unmaintained library which didn't work out of the box.graphql/graphql-playground#1429
Sorry @sevenseacat this might mean the screenshots in the book need updating.