Backend-for-Frontend and Client-Specific API Design Questions
Shaping APIs to the needs of specific consumers: Backend-for-Frontend (BFF) pattern, aggregating/tailoring payloads per client, mobile vs. web bandwidth and battery constraints, and reducing round trips for constrained clients. Covers response shaping, partial responses, and balancing a generic API against client-optimized endpoints.
Design a GraphQL schema evolution and versioning plan for mobile apps that may not update frequently. Cover safe schema changes (adding nullable fields, deprecation directives), persisted query versioning and mapping, schema facades/adaptor layers to support old clients, migration timelines, and tooling to detect deprecated field usage by clients.
Design server-side rate limiting to support per-user and per-device quotas for mobile apps, with burst capacity and plan-level differences. Explain enforcement points (API gateway, edge proxies, microservices), how to communicate limits to clients, data structures to store counters, and strategies to gracefully degrade features when limits are hit.
Design an offline-first sync strategy for a mobile notes app that supports create/edit/delete while offline, background sync when connectivity returns, and deterministic conflict resolution. Describe data model on client, change tracking, server API endpoints, sync algorithm (push/pull), and conflict resolution approaches (LWW, operational transforms, CRDTs).
Design a JSON API error schema for mobile APIs that includes: machine-readable code, human-friendly message, retryable boolean, HTTP status, optional 'retry_after' seconds, details array for field errors, and a localization key. Provide a short example payload and explain how a mobile client should interpret each field and decide whether to show the error or retry automatically.
Design an API for infinite-scroll on mobile using cursor-based pagination. Specify request parameters, sample JSON response including items, next_cursor and has_more, handling of expired/invalid cursors, maximum page size, and how to mitigate duplicates or missing items if the underlying dataset changes while the user scrolls.
Unlock Full Question Bank
Get access to all Backend-for-Frontend and Client-Specific API Design interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.