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

There are simple reasons GraphQL is prefered to REST.

It's a spec and not a architectural approach, which makes all GraphQL APIs more uniform than all REST APIs.

It comes with a type-system that makes code generation really easy and allows for tools like Graphiql, which are orders of magnitude better than what most REST docs deliver.

Can this be done with REST?

Sure, just use something like OpenAPI.

Problem is, most REST APIs don't use such tools/specs, but most GraphQL APIs do.



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

Search: