Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It’s understandable that the benefits don’t immediately seem obvious. We have all been working with REST for such a long time that we forgot what didn’t make sense when we were learning REST.

A good way to think about GraphQL is it’s data centric as opposed to operation centric. The unit you work with is the object instead of the operation.

Object level querying instead of operation level querying

Object level auth instead of operation level auth



Wasn’t the whole point of REST that it was object (resource) centric? Not saying graphql isn’t, but there’s not much of a difference in that regard. If anything I’d say graphql is more about the relationships than the objects.

Graphql is more composable for querying, so that’s nice. In terms of mutations, it’s basically just RPC again (and a lot of us missed RPC when REST became popular). And then it has a model for subscriptions, but they still feel a little like second class citizens support -wise at the moment.

None of these are judgements. Just interesting to compare the 2 ideologies.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: