Browse
AI Directory Open Source AI News 🏆 AI Challenge AI Statistics
Browse by profession
Accounting, Bookkeeping & TaxCompliance, Audit & GRCConstructionCustomer SupportData ScienceMedical All 38 professions →
Company
About Advertise Submit a tool Get the free AI guide
Home AI Directory Career Paths AI News
Home AI News Software
💻 Software

AI Code Assistant Powers GraphQL Mocks at Expedia, Airbnb

An AI code assistant now generates GraphQL mock responses for developers at Expedia and Airbnb, significantly boosting efficiency in API development workflows.

August 15, 2026· 5 min read
AI Code Assistant Powers GraphQL Mocks at Expedia, Airbnb

An advanced AI code assistant is now at the forefront of GraphQL development at major tech companies, with Expedia Group and Airbnb implementing large language models (LLMs) to generate mock GraphQL responses. This innovation significantly enhances developer productivity by automating the creation of realistic data for API testing and frontend development, even when backend services are incomplete.

AI Code Assistant Streamlines GraphQL Mocking for Developers

The landscape of AI tools for developers continues to expand, with a notable advancement in how Software Developers handle GraphQL API development. Expedia Group has recently unveiled mockql-rs, an open-source command-line interface (CLI) built in Rust, designed to generate GraphQL mock responses using large language models at the time of a request. This marks a significant step forward in coding AI, addressing a long-standing pain point for developers: the creation and maintenance of mock data for evolving APIs.

For Software Developers, the appeal of this AI code assistant is clear. Traditional development often involves manually crafting extensive JSON fixtures to simulate API responses, a process that is not only time-consuming but also prone to becoming outdated with every schema change. Samuel Vazquez, a software engineer at Expedia Group, highlights that generative AI models, while poor at inventing entirely new structures, are exceptionally good at populating existing ones. A GraphQL schema provides this precise, bounded structure, allowing the AI to fill it with relevant, realistic data.

How Expedia’s mockql-rs Enhances Developer Productivity

Expedia’s mockql-rs operates as an intermediary, sitting between the client application and the backend server. Software Developers can annotate specific fields within their GraphQL queries with an @mock directive, optionally providing a hint to guide the AI’s generation. The tool then intelligently parses and validates the operation against the schema, utilizing tools like apollo-compiler.

Crucially, mockql-rs distinguishes between annotated mock fields and real fields. It forwards the requests for real data upstream to the actual backend, while simultaneously prompting the LLM with the operation and a relevant subset of the schema for the mock fields. The result is a seamlessly merged response where live backend data coexists with AI-generated data. This capability means a developer can receive a single, comprehensive response containing actual property details from a backend alongside generated recommendations for a feature whose resolver is not yet built, significantly accelerating iteration cycles and overall developer productivity AI.

Expedia’s decision to implement this as a CLI was strategic, ensuring broad accessibility. Any test runner, continuous integration (CI) job, or build script can easily execute the process, avoiding complex SDK or client-library dependencies. This design choice makes it a versatile addition to a Software Developer’s toolkit, potentially rivaling the utility of other AI code generation tools by focusing on a specific, high-value problem.

Divergent Approaches to AI-Powered GraphQL Mocks

While Expedia Group’s mockql-rs represents a runtime solution, it’s not the only AI-driven approach to GraphQL mocking. Airbnb, for instance, introduced its own @generateMock directive in April, which operates at build time. Airbnb’s method involves processing the directive during code generation, producing both a JSON file of mock data and typed accessor functions. This output is then used for demo applications, snapshot tests, and unit tests, with the generator intelligently preserving manual edits on subsequent runs.

Further illustrating the varying perspectives, the GraphQL Foundation also opened an RFC (Request for Comments) in February, proposing a third distinct design. This RFC defines an @mock directive at the operation level, rather than on individual fields, allowing for the selection of named mock responses. A key requirement of the RFC is that a conforming client should return a mock without initiating any network request, with mock responses residing in a dedicated __graphql_mocks__ directory. These three distinct implementations, despite sharing a common goal, highlight the ongoing exploration within the developer community on the best way to integrate AI code generation into GraphQL workflows, presenting Software Developers with different options to consider.

What is the Broader Impact on AI Tools for Developers?

The emergence of these LLM-powered GraphQL mocking solutions from industry leaders like Expedia and Airbnb underscores a growing trend in AI tools for developers. This specialized application of AI code assistant technology demonstrates how large language models are moving beyond general code completion, like that offered by GitHub Copilot or Tabnine, into more domain-specific, workflow-enhancing roles. For Software Developers, this means less time spent on boilerplate and more focus on core logic and innovation.

This development could also influence the evolution of other coding AI solutions and GitHub Copilot alternatives. As AI models become more adept at understanding and manipulating structured data based on schemas, we might see similar intelligent generation capabilities applied to other API specifications or data models. The ability to generate realistic, context-aware data on demand represents a significant leap for developer productivity AI, potentially reducing debugging time and accelerating the delivery of new features. Software Developers are gaining powerful allies in their daily tasks, transforming how applications are built and tested.

A practical takeaway for Software Developers is to explore how integrating AI-driven mock generation tools can drastically cut down on manual data setup, allowing for faster iteration and more robust testing of frontend components, even in the absence of fully implemented backend services. This shift empowers teams to develop in parallel more effectively.

Frequently Asked Questions

How do AI code assistants like Expedia’s mockql-rs improve GraphQL development workflows?

These AI tools for developers generate realistic mock data for GraphQL fields that don’t yet have live resolvers, eliminating the need for manual JSON fixture creation. This dramatically accelerates frontend development and testing cycles, especially when backend services are still under construction.

What’s the main difference between Expedia’s and Airbnb’s AI-powered GraphQL mocking solutions?

Expedia’s `mockql-rs` is a runtime CLI that generates mocks on-demand, merging them with live data in a single response. Airbnb’s `@generateMock` directive operates at build time, creating static JSON files and typed accessor functions for testing and demo environments.

Can these AI code generation tools replace traditional GraphQL schema definition entirely?

No, the GraphQL schema remains the foundational specification that these AI code assistants rely upon to understand the data shape. The AI excels at filling in data *within* a defined schema, not inventing the schema itself, making it a powerful complement to existing API design.

This article is provided for general information only and does not constitute professional advice. Facts, product details, and figures were accurate to the best of our knowledge at the time of publication and may have changed since. Zekai is an independent publisher and is not affiliated with the companies mentioned. Spotted an error? See our Corrections & Removal Policy.
#AI news#Airbnb#artificial intelligence#Expedia#GraphQL#Software Developer

The weekly AI briefing for your profession

One weekly email: the AI changes that actually affect your profession — tools, deals, and what to do about them.

Free · 1 email/week · profession-segmented · unsubscribe anytime

More Software stories