Hacker News new | ask | show | jobs
by nine_k 3473 days ago
Verily!

GraphQL is one way to do just that.

REST has the virtues of uniformity and discoverability. I don't yet understand whether GraphQL possesses any of these too, though.

2 comments

In theory yes, in practice, I never saw REST discoverability being used much IRL
GraphQL puts discoverability front and centre, by prioritizing introspection and static typing. GraphiQL (the browser-based GraphQL explorer) is pretty hard to beat.

Check out Github's GraphQL explorer for a great example of this: https://developer.github.com/early-access/graphql/explorer/

Because 90% of the "REST" developers don't actually build hypermedia apis, so they aren't really "REST" if you denote "REST" as somewhat complies with Roy Fielding's paper where he invented the acronym REST
Can you provide standardized examples of REST's uniforms toy and discoverability?
Its worth nothing that Roy Fielding, the guy who coined the term REST, doesn't consider an API RESTful unless it implements HATEOAS. At least, that's what he said in some talk I watched sometime ago.
He doesn't consider an API restful unless it is a hypermedia api, of which HATEOAS is an excellent example of.