Hacker News new | ask | show | jobs
by jerf 2892 days ago
With a standard REST interface, you have to name all such combinations in advance. Possibly build custom code for each. With GraphQL, you specify them all at once, and are guided towards implementing code that will handle that. (There's no magic in GraphQL, of course, but the conceptualization alone can be useful. And if you're already in some particular ecosystem, they may have some localized magic you can use.)

You could just take your GraphQL backend and implement those specialized REST calls, sure, but then why not expose it?

2 comments

> With a standard REST interface

There's no such thing.

> you have to name all such combinations in advance.

No you don't.

> Possibly build custom code for each.

As much as any other API.

There is a "standard" REST interface described in the paper on REST. There are a lot of rules/guidelines for a RESTful API but many API's don't follow them and tend to be a mix of REST and JSON RPC.
Do you though?

... OData ...

It's a thing.