How I Started Mocking My GraphQL Schema
summary
An open-source module takes a GraphQL SDL schema, builds a minimal object model, and generates mock data for every field while allowing custom mocks keyed by type. It uses a cache to handle recursive types (cutting mock generation from ~83,000 ms to ~50 ms) and includes tools for deployment (Now), assertions (Chai), Artillery-based load testing, plus utilities: a query tester, mock generator, and load-test helper.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 2:14Why Easy GraphQL Mock
- 4:42Mocking challenges
- 7:55Caching and performance
- 9:19Customizing mocks
- 11:26GraphQL Tester and Now
- 13:34Automated query generation
- 14:36Contribute to GraphQL tools
related talks
22mA Mock Is a Promise: Making GraphQL Mocks Enforceable
22mMocking and automocking for tests and storybooks
25mSophisticated Schema Mocking
30mIncrease Your Productivity With No Code GraphQL Mocking
26mGraphQL Data Mocking at Scale With LLMs and @generateMock
39mUsing GraphQL SDL files as executable API Contracts
24mGoing GraphQL
29mClosing the Loop: How GraphQL Gives Coding Agents Eyes on What Actually Matters
