Re:Migrating Netflix to GraphQL Safely
by dcre on Sunday June 18, 2023 @02:41PM
(#36383026)
This is helpful, but to me 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.
[ Parent
| on HN ]
Re:Migrating Netflix to GraphQL Safely
by magic_quotes on Sunday June 18, 2023 @04:10PM
(#36383958)
Pretty 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.
> 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.
Pretty 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).
I agree, the schema language itself is very nice. The trick is to use a web server framework that generates the OpenAPI spec for you.