# dotansimha/graphql-code-generator

A tool for generating code based on a GraphQL schema and GraphQL operations (query/mutation/subscription), with flexible support for custom plugins.

Repository: https://github.com/dotansimha/graphql-code-generator
Canonical: https://ross.abutalabs.com/products/graphql-code-generator
Homepage: https://the-guild.dev/graphql/codegen/
Language: TypeScript
License: MIT
License Family: permissive
Topics: graphql, typescript, schema, code-generator, graphql-schema, codegen, resolvers, react, angular, csharp, java, android, the-guild
Last push: 2026-08-23T14:28:36+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 87, longevity 100
- inputs: {"age_days": 3558, "days_push": 10, "days_rel": 10, "gap_med": 6, "n_releases_24m": 64}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 11264, forks 1403 (observed 2026-08-28T04:10:46.580800+00:00)

## What it is
GraphQL Code Generator is a plugin-based CLI tool that generates typed code from GraphQL schemas and operations (queries, mutations, subscriptions, fragments). It supports many output targets including TypeScript types, typed React/Vue/Angular hooks, typed resolvers, and SDKs, with a rich ecosystem of community and custom plugins.

## Use cases
- generate TypeScript types from a GraphQL schema
- generate typed React hooks for GraphQL queries and mutations
- generate typed GraphQL resolvers for a Node.js server
- create a fully-typed GraphQL SDK for my API
- avoid hand-writing types for GraphQL operations
- generate GraphQL client code for Vue or Angular
- write a custom codegen plugin for my GraphQL stack

## When to choose
- you use GraphQL and want end-to-end type safety between schema, client, and server
- you work with React, Vue, Angular, Svelte, or Next.js and want typed queries/mutations
- you want typed resolvers for Node.js or Java GraphQL servers
- you need customizable code generation via plugins or presets

## When to avoid
- your project does not use GraphQL
- you prefer hand-written types or a different codegen approach
- you need a non-JavaScript toolchain without Node.js available

## Facets
- artifact type: cli-tool
- maturity: stable
- function: graphql, type-system, cli, plugin-system, sdk
- domain: web-development, frontend, backend, developer-tools, apis
- platform: cli, cross-platform
- tags: graphql-codegen, codegen, typed-graphql, the-guild, typescript, react, angular, vue, resolvers, schema, code-generation, graphql, nodejs, web

## Member repositories
- dotansimha/graphql-code-generator (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:46.580800+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:16:24.038171+00:00, confidence not recorded.
  - readme: https://github.com/dotansimha/graphql-code-generator (fetched 2026-08-28T04:10:46.580800+00:00, sha f9c8db72184c)
  - homepage: https://the-guild.dev/graphql/codegen/ (fetched 2026-08-29T08:15:15.458611+00:00, sha 5bf896fdfd28)
  - site_page: https://the-guild.dev/graphql/codegen/docs (fetched 2026-08-29T08:15:15.461383+00:00, sha 6ec83e4e3f1b)
  - site_page: https://the-guild.dev/graphql/codegen/docs/getting-started (fetched 2026-08-29T08:15:15.463501+00:00, sha 20be0720249a)
  - site_page: https://the-guild.dev/graphql/codegen/docs/custom-codegen/plugin-structure (fetched 2026-08-29T08:15:15.465449+00:00, sha 25bfe48eba1e)
  - site_page: https://the-guild.dev/about-us (fetched 2026-08-29T08:15:15.467146+00:00, sha 4c4f11519fb9)
  - site_page: https://the-guild.dev/graphql/hive (fetched 2026-08-29T08:15:15.468767+00:00, sha bc0e7312aef8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
