by danpalmer · 7y ago · 0 comments
I disagree. GraphQL is more difficult to implement than "bad REST", but probably easier to implement than "good REST", partially because there's very little tooling around good REST implementations.
If you just want JSON over HTTP with some status codes, then sure GraphQL is loads more work, but that's definitely not REST.
The innumerable patches/packages trying to fix what GraphQL lacks - goes to show it's a good idea at surface level yet poorly thought out from ground up.
yes this
Qualifier: have not been able to use graphql yet, and I'd still like to try it out at least before making and judgements
Just some benefits we've seen:
- Automatic codegen in the client removes a lot of boilerplate.
- Verification of schemas in CI makes sure we don't "go backwards" on the API inadvertently.
- Documentation tooling that makes it easy to show API structure.
- Easy to generate schemas automatically from underlying data models in the backend service (database tables, ORM models, enums, etc).
- Great type safety compared to JSON over HTTP.