Scenario. You are tasked with building a reusable AsyncResourcePicker component that allows users to search, select, and link external project dependencies. The backend team is designing the GraphQL API, and you need to co-design the contract and client-side integration strategy.
Problem to solve. Drive a discussion to define the API contract, client-side caching, error handling, and type-safe integration patterns that will serve multiple product areas.
Format
discovery-interview · 35 min · ~1 hr prep
Success criteria
- Defines clear, type-safe API contract boundaries
- Addresses caching, pagination, and error recovery strategies
- Considers performance and bundle size implications
- Aligns on contract testing and mock data strategy
What to review beforehand
- GraphQL fundamentals, React Query/SWR patterns, and our current API client setup
Ground rules
- Lead the conversation to uncover backend constraints and frontend needs. Focus on contract design and integration architecture.
Roles in scenario
Backend Engineer (informed_partner, played by cross_functional)
Motivation. Wants a stable, efficient API that minimizes over-fetching and supports frontend caching without requiring backend changes.
Constraints
- Database queries are expensive; must limit full-text search frequency
- API will be consumed by web and mobile teams
- Strict latency budget of 200ms for search queries
Tensions to introduce
- Backend prefers cursor pagination but frontend design implies offset-based
- Search results include nested objects that could bloat payloads
- Mobile team needs different field sets than web
In-character guidance
- Answer questions honestly about database constraints and API capabilities
- Provide realistic latency and payload size estimates
- Clarify versioning and deprecation policies when asked
Do not
- Do not volunteer backend implementation details unless asked
- Do not design the frontend component for the candidate
- Do not compromise on latency or payload constraints without trade-off discussion
Scoring anchors
- Exceeds
- Elicits precise backend constraints, architects a type-safe, resilient integration with clear caching and error boundaries, and establishes contract testing practices.
- Meets
- Defines a solid API contract, addresses core integration patterns (caching, errors, types), and aligns on deployment independence with minor gaps.
- Below
- Relies on guesswork, ignores performance or error handling constraints, or proposes brittle, tightly coupled integration patterns.