Generate anything from your GraphQL schema
Typed clients, resolvers and SDKs from your schema and operations, with a simple CLI. Part of the Hive ecosystem by The Guild.
- MIT licensed
- 51+ plugins and presets
- Watch mode for dev and CI
The standard for GraphQL type safety
47M
Weekly npm downloads
51+
Plugins and presets
10y
Maintained since 2016
Your schema is the source of truth
Type safety end to end
Typed clients, resolvers, and documents generated straight from your schema — no hand-written types drifting out of sync.
Watch mode & CLI first
One command in development and CI. Watch mode regenerates on every schema or operation change.
An ecosystem of plugins
TypeScript, React, Vue, Apollo, urql, Java, C#, Dart — and when nothing fits, writing your own plugin takes minutes.
Start with these
- Client preset@graphql-codegen/client-presetThe recommended way to type GraphQL operations on the frontend — one preset for React, Vue, and vanilla TypeScript.
- Server preset@eddeee888/gcg-typescript-resolver-filesTyped resolvers with a scalable file structure for GraphQL Yoga and Apollo Server — write only the logic.
- Schema AST@graphql-codegen/schema-astMerge all your type definitions and print the final schema into a single .graphql file.
Discover the complete ecosystem of tools and libraries
Complete GraphQL Federation Stack
Our libraries to support all your GraphQL needs
Explore the Ecosystem