~/talk

Mocking and automocking for tests and storybooks

Talkat GraphQL Day Toronto 2019 · on Friday, 2019-03-15· [testing, developer-experience]
slides:none on file

GraphQL mocks move from per-query JSON blobs to a reusable schema-driven approach using addMockFunctionsToSchema and graphql-tools; an auto-mocked provider is built and plugged into Storybook and tests, generating realistic objects so only types need maintenance instead of every query. It returns defaults like hello world and shows 137 total results in the demo; caveats: non‑deterministic random data, poor time-series fidelity, and need to seed faker/math.random for stable snapshots.

AI-written summary · about

  1. 0:00Start
  2. 3:28importing the curry from the component
  3. 4:42add a new field to the initial query
  4. 10:32passing in some resolvers
  5. 13:58add a resolver for the category
  6. 20:55tweak the coordinates
~/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.