Sophisticated Schema Mocking
summary
Coinbase adds network middleware to its in-house data layer so Relay requests hit an intercepting mock server instead of the network, using graphql-tools/mock and executeGraphQL to return schema-accurate, type-correct responses. This removes brittle per-test fixtures from Nock/MSW/Apollo approaches, lets tests run with no explicit mocks, supports field-level overrides and post-fetch mutation of real responses, and powers a live Storybook sandbox plus auto-generated unit tests — the system ships and meaningfully reduces test flakiness and manual setup time.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 0:38Presentation Overview
- 4:10Mocking in Tests
- 7:29Mocking Tools
- 11:00Recap
- 18:04Manual Testing
- 19:36Other Uses
- 22:30Benefits
- 23:15Questions
related talks
22mMocking and automocking for tests and storybooks
34mSchema-Driven Testing with Mock Service Worker
16mHow I Started Mocking My GraphQL Schema
38mDeterministic Mocking with GraphQL and Apollo Lunar Launch
22mA Mock Is a Promise: Making GraphQL Mocks Enforceable
26mGraphQL Data Mocking at Scale With LLMs and @generateMock
40mStrategic Business Functionality Testing: Accelerating Development Through Mocking
33mGraphQL mocking and why it is important for developer productivity.
