Expedia Group has open-sourced mockql-rs, a command-line interface (CLI) written in Rust. This tool generates GraphQL mock responses using a large language model (LLM) during a request. It represents the third public initiative in six months aimed at solving the problem of creating mock GraphQL data, following Airbnb's @generateMock directive and a GraphQL Foundation RFC.
The core idea behind these tools is that a GraphQL selection set provides a structured specification that LLMs can effectively fill. This approach helps developers avoid manually creating lengthy JSON fixtures that quickly become outdated with schema changes. LLMs are used to populate these predefined structures, which they are better suited for than inventing new data shapes.
mockql-rs operates as a standalone process positioned between the client and the server. Developers annotate specific fields with @mock and an optional hint. The tool then validates the operation against the schema, separates annotated fields from real ones, forwards real fields upstream, and prompts the LLM with the operation and a subset schema. Finally, it merges the live backend data with the LLM-generated data into a single response. This allows a single response to contain both real and mocked data for fields whose resolvers are not yet implemented.
Expedia chose a CLI implementation for mockql-rs to ensure broad compatibility with various development workflows, including test runners, CI jobs, and build scripts, without requiring an SDK or client-library dependency. This design facilitates easier integration into existing development environments. The ability to generate contextual mock data on demand can accelerate frontend development by decoupling it from backend readiness.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
Expedia Group open-sourced mockql-rs, a Rust CLI that generates GraphQL mock responses using a large language model (LLM) at request time. This tool, along with similar efforts from Airbnb and the GraphQL Foundation, addresses the challenge of rapidly creating mock data for GraphQL development, allowing developers to work with incomplete backend services.