Deterministic Mocking with GraphQL and Apollo Lunar Launch
summary
Shows a concrete solution: Apollo Server plus a tiny mocks file gives realistic fake data but couples tests to defaults, so ezCater built Lunar deterministic GraphQL mocks to seed Apollo Server per test. Demo uses Apollo Engine, react-test-renderer, MockProvider and Cypress end-to-end with Apollo Server to drive integration specs. Tests change a mock list from mock list default 5 -> test 2, assert exact names and mutation roundtrips, and demonstrate determinism — the live demo fails then is fixed, proving it works.
AI-written summary · about
chapters (9)
- 0:00Intro
- 1:07GraphQL
- 2:58Apollo Server
- 5:40GraphQL Playground
- 8:50Apollo Engine
- 15:40Testing
- 23:24Integration Tests
- 26:27Demo
- 34:38Recap
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
34mSchema-Driven Testing with Mock Service Worker
26mGraphQL Data Mocking at Scale With LLMs and @generateMock
21mApollo, GraphQL and Vue the ultimate stack
49mIncreasing Team Productivity with Mock API Servers.
