Settings

Theme

GraphiQL: GraphQL’s Killer App?

medium.com

88 points by dschafer 10 years ago · 17 comments

Reader

DIVx0 10 years ago

I am building a GraphQL service to act as a endpoint-to-rule-them-all and GraphiQL has helped me sell the concept very well. It is much easier to talk about how queries work when a developer can just jump right in and start playing with it without having to setup any tooling or whatnot.

daurnimator 10 years ago

Things like postman (https://chrome.google.com/webstore/detail/postman/fhbjgbifli...) exist for normal REST APIs. But it's lack of use suggests to me this isn't something people need.

  • jesstaa 10 years ago

    Interactively querying REST APIS is a massive pain, doing anything useful requires multiple dependent queries, postman doesn't really help with that. Being able to query a graph interactively is actually useful, I've used graphiql to explore the data graph to figure out the query I need for the data requirements of a component before I start writing the actual component itself.

    • davedx 10 years ago

      > doing anything useful requires multiple dependent queries

      That really depends on your API! We have an orchestration layer that exists specifically so our front end does not have to run multiple queries all the time. Most of what our front end does is by running a very small handful of queries.

      I think orchestration layers are something most growing/larger orgs strive for, in my experience.

  • davedx 10 years ago

    We use postman extensively at work. We even have non-devs using it to hack with API's to get things done without having to wait for a UI to be built. It's a great tool. I especially like how you can serialize all of your saved endpoints and send them to other devs.

  • stupidcar 10 years ago

    "1,407,161 users"

    "it's lack of use"

    ...?

    • daurnimator 10 years ago

      I've never actually seen people use it day to day; nor hear it talked about.

      I (wildy) assume a lot of people download it, but never use it. I'd be interested to see retention stats.

javajosh 10 years ago

Am I the only one who designs endpoints to spit back usage instructions if you call them without arguments? This goes a long way toward helping devs use those endpoints, in my experience - and they can use normal tools (in particular, the network pane of Chrome Dev tools). This is not to take away from GraphiQL, but it doesn't seem like that much more than you get with such a convention.

  • davedx 10 years ago

    I've not seen this practice very much in my experience; most API's I've worked with go the "automated documentation generation" route and host the docs somewhere separate instead. This does mean you don't need tooling just to find out how to use the API.

    This is distinct from throwing exceptions when an endpoint is called with e.g. invalid parameters.

  • techdragon 10 years ago

    No you're not the only one. But I do fear we may be some sort of "silent minority". I always felt that having human and machine readable instructions was part of trying to achieve "proper" REST, the full HEOTAS or whatever the acronym is. I admire the principle and the outcomes it strives for, but very much dislike the "wankery" that goes on over the topic sometimes.

olalonde 10 years ago

On a related note, http://editor.swagger.io & http://petstore.swagger.io provide a similar UI for exploring REST APIs which have an OpenAPI (formerly known as Swagger) specification.

dexwiz 10 years ago

I am not sure why editors think a mark up is a good experience. Recently I have seen several editors that have markup on one side, and a formatted/stylized output on the editor. The output only sometimes feeds back to the markup, and usually does not have full functionality. This ends up being slow most of the time, and clicking/dragging/expanding text is not a good experience. They only thing they provide is validation feedback. But you still have worry about closure, indentation, formatting, etc. I usually default to using a light text editor and a shell watching validation.

Is everyone so sick of Windows forms that we can only edit text now? No GUI?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection