morph icon indicating copy to clipboard operation
morph copied to clipboard

Move GraphiQL.re from graphql template to morph-server-graphql

Open baransu opened this issue 6 years ago • 3 comments

It would be great to provide ~graphiql: bool option to Morph_graphql_server.make or provide something like Morph.Response.text(Library.GraphiQL.html, Morph.Response.empty) available from Morph_graphql_server module

/ cc @cem2ran

baransu avatar Oct 29 '19 19:10 baransu

Would be great!

Some more (powerful) options:

  • https://github.com/OneGraph/graphiql-explorer
  • https://github.com/prisma-labs/graphql-playground

I added GraphiQL as it was the easiest and quickest, but worth considering whether one should allow this to be a bit more configurable. Should it just be a url or should it just be yet another middleware? @ulrikstrid

cem2ran avatar Oct 29 '19 19:10 cem2ran

Another option is to point users to standalone GraphQL clients like:

  • https://altair.sirmuel.design/
  • https://github.com/skevy/graphiql-app

instead of providing GraphiQL middleware.

I'm personally using Altair and none of my projects expose GraphiQL.

baransu avatar Oct 29 '19 21:10 baransu

I think that this is a documentation problem basically. I like that graphiql (or any derivative) is provided in the pesy template because it's really powerful to have there. But I'm not sure we want to integrate it into the the library. I'm not against it, I'm just not sure we want to do it since it can feel like "lock in" to that particular implementation. We also have to keep it up to date.

ulrikstrid avatar Oct 30 '19 14:10 ulrikstrid