This repo exists to provide real, runnable examples for this blog post How to write simple, expressive, and powerful test fixtures for GraphQL applications
The goal is best summarized by a gif of me using a typechecked mocking interface to easily create mocked query results:
$ pnpm install
$ pnpm codegen
Note: schema.graphql
was generated with the schema-ast
plugin, so that subsequent codegen commands can be easier to understand,
and so that the examples never break should the API change =)
$ pnpm test
Thanks to TCGDex for providing a public GraphQL API!