1. What It Is
REST is not the only way to build APIs. GraphQL and gRPC are two prominent alternatives, each solving different problems.
GraphQL (open standard, created by Facebook, 2015) is a query language for APIs. Instead of fixed endpoints that return fixed shapes, clients send queries specifying exactly what fields they want, and the server returns exactly that — nothing more.
gRPC (Google Remote Procedure Call, open-sourced 2015, GA 1.0 in 2016) is a high-performance RPC framework. Clients call server-side methods as if they were local functions. It uses Protocol Buffers (a binary serialization format) and runs over HTTP/2.
Why it matters: you'll encounter both in real systems. GraphQL is common in client-facing APIs and mobile backends. gRPC is dominant in internal microservice communication. Knowing when to use each — and why — is a common system design and interview topic.
In the full tutorial
- 2. How It Works in Practice
- 3. Common Real-World Usage
- 4. Trade-offs and Common Mistakes
- 5. Interview Angle
- 6. Practical Examples