DEV Community

Cover image for GraphQL Code Generator
Tomek Poniatowicz for GraphQL Editor

Posted on • Edited on • Originally published at blog.graphqleditor.com

GraphQL Code Generator

GraphQL is a hot technology. Its recent rise created a niche for multiple tools, like GraphQL Code Generator, having one thing in common - making using GraphQL easier & more pleasant experience.

GraphQL Code Generator is a tool that generates code out of your GraphQL schema. How? By analyzing the GraphQL schema & documents and parsing it, then GraphQL Code Generator outputs code at a wide variety of formats.

The creators currently support & maintain plugins for:

  • TypeScript
  • Flow
  • React
  • Angular
  • MongoDB
  • Stencil
  • Reason

GraphQL Code Generator let you choose the output that you need, based on plugins, which are very flexible and customizable. You can also write your own plugins to generate custom outputs that match your needs.

The GraphL Code Editor You can also try it out online:

GraphQL Code Generator

or just dive intro their GitHub repo:

GitHub logo 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.

GraphQL Conf 2023

CodeGen

npm version

https://the-guild.dev/graphql/codegen

GraphQL Code Generator is a tool that generates code out of your GraphQL schema. Whether you are developing a frontend or backend, you can utilize GraphQL Code Generator to generate output from your GraphQL Schema and GraphQL Documents (query/mutation/subscription/fragment).

By analyzing the schema and documents and parsing it, GraphQL Code Generator can output code at a wide variety of formats, based on pre-defined templates or based on custom user-defined ones. Regardless of the language that you're using, GraphQL Code Generator has you covered.

GraphQL Code Generator lets you choose the output that you need, based on plugins, which are very flexible and customizable. You can also write your plugins to generate custom outputs that match your needs.

You can try this tool live on your browser and see some useful examples. Check out GraphQL Code Generator Live Examples.

We currently support and maintain these plugins (TypeScript, Flow…

Top comments (0)