Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Angular
  3. graphql-code-generator

graphql-code-generator

MITTypeScriptrelease-1776517847091

A tool for generating code from GraphQL schemas and operations with a flexible plugin system.

Visit WebsiteGitHubGitHub
11.2k stars1.4k forks0 contributors

What is graphql-code-generator?

GraphQL Code Generator is a tool that generates code from GraphQL schemas and operations (queries, mutations, subscriptions). It solves the problem of manually writing boilerplate code by automating the creation of type-safe, consistent code for both frontend and backend development. The tool analyzes GraphQL documents and schemas to produce outputs in various formats through a flexible plugin system.

Target Audience

Frontend and backend developers working with GraphQL APIs who need to generate type-safe client code, server resolvers, or other artifacts from their GraphQL schema and operations.

Value Proposition

Developers choose GraphQL Code Generator for its extensive plugin ecosystem, support for multiple languages and frameworks, and the ability to create custom plugins for unique project requirements, ensuring efficient and error-free code generation.

Overview

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

Use Cases

Best For

  • Generating TypeScript types from GraphQL schemas for frontend applications
  • Creating React hooks or Angular services based on GraphQL queries and mutations
  • Automating backend code generation for GraphQL resolvers or database models
  • Building custom code generation pipelines with tailored plugins
  • Ensuring type safety across client-server communication in GraphQL projects
  • Reducing boilerplate code in projects using multiple GraphQL operations

Not Ideal For

  • Projects that do not use GraphQL as their API layer
  • Small-scale GraphQL APIs with only a handful of static queries where manual type definitions are manageable
  • Applications needing instant, runtime code generation without a build or compilation step
  • Teams with minimal tooling or CI/CD pipelines who prefer avoiding additional configuration and maintenance

Pros & Cons

Pros

Extensive Plugin Ecosystem

Supports a wide range of pre-defined plugins for languages like TypeScript, React, and Angular, as listed in the README, allowing adaptation to various project needs.

Type-Safe Code Generation

Analyzes GraphQL schemas and documents to produce accurate, type-safe code, reducing errors in client-server communication, as emphasized in the key features.

High Customization

The plugin-driven architecture enables the creation of custom plugins for unique requirements, providing flexibility beyond built-in options.

Active Community Support

Maintained by The Guild with an active community, ensuring regular updates and a growing ecosystem of plugins and examples.

Cons

Configuration Complexity

Initial setup involves multiple steps and configuration files, which can be daunting for teams unfamiliar with code generation tools.

Dependency on Plugin Ecosystem

The tool's effectiveness relies on external plugins, which may have varying quality, maintenance, or compatibility issues.

Build-Time Overhead

Generating code during builds can increase development time, especially for large schemas or frequent changes.

Frequently Asked Questions

Quick Stats

Stars11,237
Forks1,389
Contributors0
Open Issues517
Last commit1 day ago
CreatedSince 2016

Tags

#developer-tools#plugin-system#schema-first#graphql#code-generator#type-safety#csharp#schema#resolvers#frontend#typescript#graphql-schema#backend#angular#react#code-generation#codegen

Links & Resources

Website

Included in

GraphQL15.0kAngular10.0k
Auto-fetched 23 hours ago

Related Projects

PrismaPrisma

Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB

Stars45,812
Forks2,173
Last commit1 day ago
BitBit

AI-powered development workspaces with reusable components, architectural clarity and zero overhead.

Stars18,376
Forks953
Last commit1 day ago
AmplicationAmplication

Amplication brings order to the chaos of large-scale software development by creating Golden Paths for developers - streamlined workflows that drive consistency, enable high-quality code practices, simplify onboarding, and accelerate standardized delivery across teams.

Stars15,987
Forks1,549
Last commit1 day ago
type-graphqltype-graphql

Create GraphQL schema and resolvers with TypeScript, using classes and decorators!

Stars8,088
Forks674
Last commit20 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub