-

WG Day:

Menlo Park, California
Back to Schedule

Michael Rebello

GraphQL Data Mocking at Scale With LLMs and @generateMock

Peahi
AI and LLM

Session description

Producing valid and realistic mock data for prototyping and testing has been an unsolved challenge for years. Mock data is tedious to write and maintain, but attempts to improve the process such as random value generation and field stubbing fall short as they lack essential domain context to make test data realistic and meaningful. In this talk, I’ll share how we’ve reimagined GraphQL mocking at Airbnb by combining existing GraphQL infrastructure, rich product and schema context, and LLMs to generate convincing, type-safe mock data simply by adding a directive (@generateMock) to a field or operation: - How integrating LLMs that are highly contextualized by a schema, documentation, and UX design into existing GraphQL tools drives a leap forward in the speed and quality of mock data creation. - How a directive-driven approach lets engineers generate production-like, schema-conformant mock data without writing code. - How integrating generated mock data into the GraphQL client runtime can enable engineers to build and test clients before server implementation. - How this strategy guarantees that generated mock data is correct, deterministic, and stays in-sync with the server schema.


Session speakers

Michael Rebello

Airbnb, Staff Engineer

Michael is a Staff Engineer at Airbnb focusing on GraphQL clients, with >10 years of tech experience. Previously, he spent 6 years at Lyft as Staff Engineer leading mobile networking, building the rider app, and contributing to their engineering blog. He's spoken at conferences globally and made significant open-source contributions as a founding member of Envoy Mobile and author/maintainer of Connect-Swift. Both of these projects are now part of the Cloud Native Computing Foundation.

Get your ticket

Join two transformative days of expert insights and innovation to shape the next decade of APIs!

Get tickets
COMMUNITYDEVELOPER EXPERIENCEAPIsTOOLS & LIBRARIESCOMMUNITYDEVELOPER EXPERIENCEAPIsTOOLS & LIBRARIES
OPEN SOURCEFEDERATIONECOSYSTEMSTRACING & OBSERVABILITYOPEN SOURCEFEDERATIONECOSYSTEMSTRACING & OBSERVABILITY
BEST PRACTICESWORKSHOPSSCHEMASSECURITYBEST PRACTICESWORKSHOPSSCHEMASSECURITY