Graphqurl: Curl for GraphQL, with Autocomplete and Subscriptions(github.com)
github.com
Graphqurl: Curl for GraphQL, with Autocomplete and Subscriptions
https://github.com/hasura/graphqurl
9 comments
> most GraphQL-based web services only accept POST requests (not also GET requests)
A GraphQL server should generally be able to accept GET queries according to the spec [1]. Are there any common implementations that don't follow this?
[1] https://graphql.org/learn/serving-over-http/#get-request
A GraphQL server should generally be able to accept GET queries according to the spec [1]. Are there any common implementations that don't follow this?
[1] https://graphql.org/learn/serving-over-http/#get-request
Offering the UI in the browser versus just the CLI is an interesting idea. Go one step further and just display the results in the browser. Go another step and you got an Electron app, no CLI at all.
To clarify, GraphiQL and GraphQL Playground are already available as Electron apps, but they lack the CLI option.
Why javascript though?
Nice work, I guess it could be useful, though I would only use CLI if there is no other way, it's not easy to read compared to the one on Playground/GraphiQL
Part of the point is that it can launch a GraphiQL playground instance (which is how I use it most of the time)
You have the URL to some GQL API you need to look at, and so you run "gq" on the shell and pass the URL + flags for it to start a webserver running GraphiQL and auto-open it in your browser
You have the URL to some GQL API you need to look at, and so you run "gq" on the shell and pass the URL + flags for it to start a webserver running GraphiQL and auto-open it in your browser
[deleted]
At least on my setup the Playground UI likes to break under some
circumstances and is rather slow. The CLI output can be easy to
read once you view it with syntax highlighting, and it's trivial
to pipe the output for any further processing.
This is a great project and I'll definitely check it out the next time.
This is a great project and I'll definitely check it out the next time.
Will have to give this tool a try to see how well it fits for quick, little debugging of GraphQL endpoints.