A Mock Is a Promise: Making GraphQL Mocks Enforceable
summary
Shows a contract-first workflow where GraphQL SDL and examples become both the mock for frontend work and the contract tests for the real service using Specmatic. Demo builds a checkout BFF, unblocks frontend with mocks, then runs contract tests against the real BFF and CI. A real failure is reproduced: the resolver maps the downstream field wrongly — estimated date vs delivery date mapping — causing GraphQL non-null errors; tests fail, the mapping is fixed, and the contract tests pass as a release gate.
AI-written summary · about
chapters (10)
- 0:00Blocked checkout flow intro
- 1:31Mocks as enforceable promises
- 2:13BFF service with delivery mock
- 5:31Frontend with BFF mock
- 9:31Frontend scenarios with BFF mocks
- 11:16BFF service vs mock validation
- 14:30Contract testing as release gate
- 17:02BFF service mapping fix
- 19:34Mocking and contract testing in CI
- 21:21Key takeaways and closing
related talks
22mMocking and automocking for tests and storybooks
16mHow I Started Mocking My GraphQL Schema
38mDeterministic Mocking with GraphQL and Apollo Lunar Launch
33mGraphQL mocking and why it is important for developer productivity.
30mIncrease Your Productivity With No Code GraphQL Mocking
39mUsing GraphQL SDL files as executable API Contracts
26mGraphQL Data Mocking at Scale With LLMs and @generateMock
25mSophisticated Schema Mocking
