API Design Interview Question

What is the difference between REST and GraphQL?

Updated 2026-07-10 · Beginner friendly
Quick answer

REST uses many fixed endpoints where each one returns a set shape of data, while GraphQL uses a single endpoint where the client asks for exactly the fields it wants. GraphQL avoids getting too much or too little data, but REST is simpler and caches more easily. Neither is always better, it depends on the needs.

The key difference

With REST, GET /users/42 returns a fixed user shape, and if you need related orders you may call another endpoint. With GraphQL, you send one query listing the exact fields and related data you want, and the server returns just that.

In the interview

Use the terms over fetching and under fetching. Saying GraphQL solves over fetching, where REST returns more data than the client needs, shows you understand the real problem it targets.

Want the full API Design guide?

Read every API Design concept with notes, diagrams, and code in one place. Track your progress as you go.

Open the API Design guide All API Design questions