3 ms·
This is helpful, but it confirms my sense that a REST API with a typed spec like OpenAPI is going to get you basically all the benefits of GraphQL.
by dcre 3y ago
This is helpful, but it confirms my sense that a REST API with a typed spec like OpenAPI is going to get you basically all the benefits of GraphQL.
- magic_quotes 3y agoPretty much, they are fundamentally both RPC flavors, so it's impossible for them to have different properties beyond more or less convenient tooling. It's always jarring to see those heated GraphQL vs REST APIs (as implemented in practice) vs gRPC discussions as if they are as different as, say, client-side CRDTs.
- e12e 3y ago> Pretty much, they are fundamentally both RPC flavors, so it's impossible for them to have different properties beyond more or less convenient tooling. REST arguably has better support for catching for read queries.
- ttymck 3y agoPretty much except writing graphql schemas is actually quite enjoyable and expressive. I was always the biggest advocate for schema-first development, but OpenAPI specs were always such a pain to write and maintain. For this reason alone I would choose graphql (yet there are other benefits).
- dcre 3y agoI agree, the schema language itself is very nice. The trick is to use a web server framework that generates the OpenAPI spec for you.
- ghnws 3y agoWhile taking half the time to do it. I've yet to see one good reason to use GQL for anything but public facing APIs, like GitHub API.