MediumExperience level: 3-5 years · 8-15 years1 min read

REST vs GraphQL vs gRPC — when would you choose each?

Reviewed by Gurusankar M.

Asked inAmazonGoogleMicrosoft
#rest#graphql#grpc#api design#protobuf
Report issue

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).

On this page

Concept Made Simple

Coffee Chat Question

“REST vs GraphQL vs gRPC — when would you choose each?”

Remember It Faster

Mind Map Answer

REST
public CRUD, cacheable, simple
GraphQL
client-shaped queries, no over-fetch
gRPC
internal, fast, Protobuf, streaming

Think Beyond the Expected

What If?

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:

  • REST public/cacheable
  • GraphQL flexible field selection / over-fetch
  • gRPC internal/HTTP2/Protobuf/streaming
  • choose by use case

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

  1. What problems does GraphQL introduce (caching, N+1, complexity)?
  2. Why is gRPC poor for browsers directly?
  3. How do you cache GraphQL?

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.
Open inChatGPTGeminiClaude

Was this answer helpful?

Affiliate links

Equipment for a comfortable, productive setup.

As an Amazon Associate I earn from qualifying purchases.