Overview
GraphQL Code Generator analyzes GraphQL schemas plus query, mutation, subscription, and fragment documents to generate TypeScript types, client helpers, resolver types, and other artifacts through plugins and presets.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Generate types from both schemas and actual operation documents
The generator can combine schema information with real queries and fragments so generated types reflect the operations an application actually executes.
Compose output through plugins and presets
TypeScript, React, Angular, resolver, and other plugins or presets can be selected to match frontend and backend requirements.
For reducing drift between GraphQL contracts and application code
It fits teams that want schema changes to flow into generated frontend and backend types rather than maintaining those definitions manually.
Sources: [2]
Check plugin resolution and duplicate GraphQL packages in monorepos
Workspace hoisting can prevent the CLI from locating plugins, and duplicate GraphQL versions can produce type incompatibilities. Inspect the dependency tree in monorepo setups.
Official sources
- [1]dotansimha/graphql-code-generator repository(2026-09-21)
- [2]GraphQL Code Generator README(2026-09-21)
- [3]GraphQL Code Generator installation(2026-09-21)
- [4]@graphql-codegen/cli package(2026-09-21)
- [5]GraphQL Code Generator MIT license(2026-09-21)
Supplemental curator note
The root `0.0.0` version belongs to the private monorepo package and is not the published CLI version. `@graphql-codegen/cli` is currently 7.4.2 and requires Node.js 16+. Because plugins are loaded dynamically, pnpm/Yarn workspaces should verify that plugins resolve at the level visible to the CLI.
Try it in 3 steps
- 1
Install GraphQL and the Codegen CLI
Follow the official quick start and add GraphQL plus the Codegen CLI.
pnpm add graphql && pnpm add -D @graphql-codegen/cli - 2
Generate an interactive configuration
Answer prompts for the schema, documents, plugins, and generated output path.
pnpm graphql-codegen init - 3
Run code generation
Use the generated config to produce types and client/server artifacts from GraphQL contracts.
pnpm graphql-codegen
Growth
Growth trends · Last 30 days
11,260 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 38
- Open PRs
- 68
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- graphql
- typescript
- schema
- code-generator
- graphql-schema
- codegen
- resolvers
- react
- angular
- csharp
- java
- android
- Stars
- 11,260
- Forks
- 1,400
- Watchers
- 75
- Open issues
- 409
- Contributors
- 433
- Primary language
- TypeScript
- License
- MIT
- Repository last updated
- Sep 20, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Hoppscotch80,429 Stars
2 shared tag(s) · 2 shared category(s) · Same language
An API development ecosystem spanning REST, GraphQL, WebSocket, MQTT, Web/Desktop/CLI clients, and self-hosting.
TypeScript - Onfido GraphQL Request1 Stars
2 shared tag(s) · 2 shared category(s) · Same language
An Onfido fork of a minimal GraphQL client that defaults to global fetch and accepts full RequestInit options for requests.
TypeScript - Apollo Server13,954 Stars
2 shared tag(s) · 1 shared category(s) · Same language
A Node.js GraphQL server that builds APIs from schemas and resolvers, with standalone, web-framework, subgraph, and federation-gateway deployment paths.
TypeScript - AWS Amplify JavaScript9,561 Stars
2 shared tag(s) · 1 shared category(s) · Same language
AWS Amplify's JavaScript library for using authentication, APIs, storage, and other cloud capabilities from web and React Native applications. The current `aws-amplify` package is 6.21.0.
TypeScript - urql8,977 Stars
2 shared tag(s) · 1 shared category(s) · Same language
A GraphQL client for React, Vue, Solid, Svelte, and other frameworks that starts with document caching and grows through customizable exchanges.
TypeScript
Report incorrect information
Tell us if any listing information is incorrect or outdated.