Skip to content

DrewHoo/typechecking-graphql-mock-resolvers

Repository files navigation

typechecking-graphql-mock-resolvers

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: 2024-12-27 11 46 55

Getting Started

Install Dependencies

$ pnpm install

Run codegen

$ 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 =)

Run tests

$ pnpm test

Notes

Thanks to TCGDex for providing a public GraphQL API!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published