~/talk

Schema-Driven Testing with Mock Service Worker

Talkat GraphQLConf 2024 · on Tuesday, 2024-09-10· at 11:00· Skyline A - Level 21· [graphql, testing]
slides:none on file

Demonstrates a concrete setup that replaces brittle static response mocks with a schema-driven handler that uses graphql-tools executors plus MSW v2 to intercept real fetches in browser and Node via setupServer the handler generates incremental multipart responses for @defer/@stream, returns random scalars unless overridden, and exposes a withResolvers API to layer test-specific data in individual tests storybook, Jest, Puppeteer and Cypress all use the same handlers and websocket preview (createWebSocketHandler) is nearly ready.

AI-written summary · about

  1. 0:00Introduction and context
  2. 2:28Recap of testing pain points
  3. 5:07Defining the testing wishlist
  4. 7:11Schema-based mocking strategies
  5. 11:38Introducing mock service worker
  6. 15:38GraphQL testing library in action
  7. 23:31Subscription and future support
  8. 26:33Closing and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.