REST vs GraphQL vs gRPC — when would you choose each?
⚡ Short Answer
REST: resource CRUD, public APIs, cache-friendly, ubiquitous. GraphQL: clients need flexible, exact field selection across many resources (avoids over/under-fetching) — great for varied frontends. gRPC: high-performance internal service-to-service (HTTP/2, Protobuf, streaming, codegen).
☕Coffee Chat Question
Concept Made Simple
“REST vs GraphQL vs gRPC — when would you choose each?”
🧠Mind Map Answer
Remember It Faster
🔥What If?
Think Beyond the Expected
A mobile app over-fetches huge REST payloads and makes many round-trips — REST tweak or GraphQL?
You can fix REST with sparse fieldsets (?fields=) and composite endpoints, but if many clients need wildly different shapes across many resources, GraphQL lets each client request exactly what it needs in one round-trip. Choose by how variable the client needs are vs added server complexity.
😂Real World
Common architecture: REST/GraphQL at the public edge for clients, gRPC for fast internal service-to-service calls — each used where its strengths fit, not dogmatically.
🎯Interviewer's Expectation
Keywords they're listening for:
⚠️Common Mistakes
- ✗Picking GraphQL/gRPC by hype, not need
- ✗Ignoring GraphQL's caching/N+1 challenges
- ✗Exposing gRPC directly to browsers
✅Best Practices
- ✓Match protocol to the use case
- ✓REST/GraphQL at the edge, gRPC internally
- ✓Weigh added complexity vs benefit
🔁Follow-up Questions
- 1What problems does GraphQL introduce (caching, N+1, complexity)?
- 2Why is gRPC poor for browsers directly?
- 3How do you cache GraphQL?
🧩Related Technologies
Continue Learning with AI
Take this question deeper with your favourite AI assistant. Pick a depth, copy the prompt, or open it directly — AI is your learning companion, not a shortcut.
Plain-language foundations
I'm preparing for a software engineering interview and want to understand this from scratch, as a beginner. Topic: HATEOAS (REST APIs) Interview question: "REST vs GraphQL vs gRPC — when would you choose each?" Please: 1. Explain the core idea in simple, plain language, using an everyday analogy. 2. Define any technical terms you use. 3. Walk through one small, concrete example. 4. Finish with a single sentence I can easily remember. Keep the tone friendly and assume I'm new to this topic.
Was this answer helpful?
⭐ Featured Products
Support our platform by exploring our recommended products.
As an Amazon affiliate, purchases through these links may earn us a small commission — at no extra cost to you. It helps keep Full Stack Interview Guru free.