by cryptica · 5y ago · 0 comments
I think it's regrettable that all the big money got behind GraphQL instead of aiming for solutions which provide resource granularity and shift decision-making to the client side. Who is better placed to know what resources they want than the client? A big advantage of HTTP/REST is that it either serves individual resources or a limited number of different collections of resources and it lets clients do the heavy lifting of figuring out which resources they need and how they want to combine them. Caching REST endpoints is straight forward and resilient to DDoS attacks because the variations in responses is strictly limited.
Also, it makes sense to move processing to clients when those processing costs are imperceptible to users.
Did you read the article? Most of the issues weren't related to GraphQL, they were just Node issues/optimizations.
> I think it's regrettable that all the big money got behind GraphQL instead of aiming for solutions which provide resource granularity and shift decision-making to the client side.
This is the stated intent of GraphQL. Literally the reason it exists.
Common ways to solve that are to whitelist the allowed queries or to cache at the resolver level instead of the query level.
With GraphQL the client specifies exactly what it needs. It‘s as granular as you can imagine, unlike REST.