Airbnb developed @generateMock, a GraphQL directive that uses LLMs to automatically generate realistic, type-safe mock data for testing and prototyping. The solution combines GraphQL schema validation, product context, and design mockups to produce convincing data without manual effort. Engineers can use @respondWithMock to
•13m read time• From medium.com
Table of contents
IntroductionKey challengesGoals@generateMock: Schema + context + LLMs = magicGet Michael Rebello’s stories in your inboxWhat does mock data look like?How it works@respondWithMock: Unblocking client developmentSchema evolution: Keeping mocks truthfulConclusionAcknowledgmentsSort: