As a frontend developer, GraphQL is substantially better: fewer calls, hierarchy preserved, and no excess data over the wire.<p>As a backend developer, REST is substantially simpler to implement: HTTP endpoint is dead simple and the caching models are 30 years old (aka very well-defined).<p>The answer is definitely going to be skewed by what kind of developer you ask.<p>For backend, writing a GraphQL server by hand (schema, types, and resolvers) is a PITA. If you have a generator like Postgraphile or Hasura, it's almost a no-brainer how easy it is. REST by comparison is almost always dead simple to reason about no matter the tooling, and literally everyone already knows how it works.<p>As a frontend developer, I have never said to myself, "Gee! I'm sure glad I have to call these five separate REST endpoints with a bunch of extra data I'll never use just to render this one web page." I have split GraphQL calls into separate requests, but only for performance optimization in specific cases.<p>REST gives backend more power. GraphQL gives frontend more power. If you're like most shops, backend doesn't fully trust frontend and are kind of lazy in an anal retentive kind of way. If you're like Netflix, you've got so many different clients that supporting all variations of REST was simply unmaintainable, so GraphQL really was their only sane path forward.<p>Then of course there's gRPC, but I still consider that a serialization optimization rather than a real paradigm difference.
In my experience GraphQL doesn’t scale great and it is incompatible with frontend state stores (like Vuex/Pinia) due to every component needing a different subset of data. Maybe you can write a layer that uses data from the store and progressively loads what’s needed but that sounds like a huge pain and frontend code that needs to be able to handle the absence of data until specific properties load.<p>Places where I’ve used GraphQL feel like we are just playing around and spend more time trying to get basics things to work with a ton of boilerplate vs actually building. Maybe that’s just my experience but yeah.