Lesson 5 of 30
Choosing REST or GraphQL is a mechanics question this track assumes you already know the answer to. The interview question is different: given an API, what tradeoffs is a frontend team actually designing around?
13 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
A fixed-shape REST endpoint returns every field of a user object, including several a bandwidth-constrained mobile app never uses. What is this an example of?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
This lesson assumes you already know what REST and GraphQL are mechanically — that's a separate lesson elsewhere in this platform. Here, the question is different: in a system design interview, you're rarely asked to pick a protocol from scratch. You're asked to reason about the shape of an API a frontend team has to live with, and three tradeoffs come up constantly:
Say a company's API serves both a data-heavy web dashboard and a bandwidth-constrained mobile app. A single fixed-shape REST endpoint returning every field a user object has satisfies the dashboard but overfetches badly on mobile, where every unused kilobyte costs real load time on a slow connection. Naming this out loud — "these two clients have genuinely different fetching needs, so the API design has to account for both, not just the one I'm picturing" — is a stronger interview answer than assuming one shape fits every consumer.
On versioning: if that same API adds a required field to an order object, every client parsing the old shape without it will either crash or silently misbehave, unless the API commits to backward compatibility (new fields are additive and optional, not breaking) or ships an explicit version bump (/v2/orders) that old clients can keep using until they migrate on their own schedule.
"How would you design the API for this feature, and what tradeoffs would you make?" tests whether a candidate can reason about overfetching, pagination shape, and versioning as deliberate design decisions with real downstream consequences, not just recite "REST vs. GraphQL" as if naming a protocol were the whole answer.