Hacker News new | past | comments | ask | show | jobs | submit login
When to Use gRPC vs. GraphQL (stackoverflow.blog)
1 point by lorendsr on Nov 30, 2022 | hide | past | favorite | 1 comment



I'm not convinced that GraphQL (which, spoiler, this article puts forth as the winner for client/server communication) is a win for most cases, unless you're literally at Stack Exchange scale.

> In client-server communication, latency is high. We want to be able to get all the data we need in a single round trip, have flexibility in what data we fetch for different views, and have powerful caching

You can (mostly) get all 3 of these with REST, if you sacrifice a little flexibility and add some backend filtering. The upside is your stack is simpler than using a GraphQL library and keeping it patched (oh yeah, graphql library security vulnerabilities are a thing, sorry for the nightmare fuel)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: