All jobs / Full-stack developer / End-to-End Architecture
Full-stack developer interview question · 1–3 years
You need to change `amount` from a string to a number.
How do you version without stranding the UI?
The strongest answer
Prefer additive changes; if you must break, run v1 and v2 until the last old bundle is gone — do not flip a header on Tuesday and delete v1 on Tuesday
Why it works
Exactly. Version when the meaning changes. Overlap the window. A header that mutates JSON is a hidden second API.
What a good answer covers
- Additive first; versions for breaks.
- Overlap old and new until clients move.
- Do not mutate one URL by a client header.
- Hard-refresh is not a migration tool.
Answers that fall short
- Close, but not the strongest: Put `/v2` on every tweak including new optional fields
Version inflation trains people to ignore versions. Optional fields do not need a new number. - Weak: A `X-Client-Version` the API uses to change shape silently
Silent shape-shifting by client version is untestable and uncacheable. - Red flag: Tell users to hard-refresh in the release notes
Release notes do not reach a phone that slept through the deploy.
Who gets asked this
More End-to-End Architecture questions
- You want to rename `title` to `headline` on a resource the SPA already ships. How do you roll the rename?
- What do you say, and when should the prompt appear?
- Every click on a table of 40 rows fires OPTIONS then GET, and it shows on slow networks. How do you stop the…
- You are tired of the form accepting a payload the API 400s. Where does the schema live?
- The marketing layout SSR-renders a 'Your workspace' header for logged-in people. How does the server render a…
- Creators upload long videos from phones on bad networks. How do you take a 2GB file on a train Wi-Fi?
- Access tokens last 15 minutes. You need a stay-logged-in story. How do you refresh the session?
- Users upload attachments other users can open in the app. When may the UI show 'ready to download'?