GraphQL Code Generator - Generate TypeScript typings out of a GraphQL schema

Generate code from your GraphQL schema with a single function call

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.

What is GraphQL Code Generator?
GraphQL Code Generator is a CLI tool that can generate TypeScript typings out of a GraphQL schema. When we develop a GraphQL backend, there would be many instances where we would find ourselves writing the same things which are already described by the GraphQL schema, only in a different format; for example: resolver signatures, MongoDB models, Angular services etc.
GraphQL Code Generator was built to address exactly that. By analyzing the schema and parsing it, GraphQL Code Generator can output code at a wide variety of formats, based on pre-defined plugins or based on custom user-defined ones. Regardless of the language that you're using, GraphQL Code Generator got you covered.

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 available plugins, which can also be easily customized. As it 100% open-source you can write your own plugins to generate custom outputs that you need.

I got your attentiopn? Good, now go try it out online:

or just explore its GitHub repo if that’s what you prefer.
Snehal Kumar

Jun 24 2019

Write your response...

On a mission to build Next-Gen Community Platform for Developers