GraphQL Codegen TypeScript Mock Data

JSON →
library 5.1.1 ·javascript
verified Jun 7, 2026

A GraphQL Codegen plugin that generates TypeScript mock data factories based on your GraphQL schema. Current stable version is 5.1.1, requires Node >=18, graphql >=14.6.0, and TypeScript >=5.0.0. The plugin supports custom scalar mappers (casual or faker), circular relationship termination, enum value transformation, and includes/excludes filters for specific types. It integrates with the GraphQL Code Generator pipeline to produce type-safe, realistic fake data for testing and development. Compared to alternatives like graphql-faker or msw's data generation, this plugin generates compile-time validated mock objects directly from schema types with TypeScript type inference.