Built-in generators (templates) for GraphQL Code Generator v0.8.21, specifically TypeScript single-file and multiple-file output. This package is part of the legacy `graphql-code-generator` ecosystem (pre-v1), which has been superseded by `@graphql-codegen/cli` and `@graphql-codegen/typescript`. It provides Handlebars-based templates for generating TypeScript types from GraphQL schemas. Release cadence: no longer updated; last release 0.8.21. Key differentiators: enables custom generators by implementing the `GeneratorConfig` interface and using Handlebars templates, with support for both single and multi-file output.
npm install graphql-codegen-generatorsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates using the built-in TypeScript single-file generator with a minimal GraphQL schema.
Migrate to the official GraphQL Code Generator v1+ (https://the-guild.dev/graphql/codegen). Replace `graphql-codegen-generators` with `@graphql-codegen/typescript` and use `@graphql-codegen/cli`.
If upgrading to v1, rewrite custom generators using the new plugin API (https://the-guild.dev/graphql/codegen/docs/custom-codegen).
Use the provided build scripts (yarn build) or import the pre-built package. Do not attempt to load templates at runtime.
Refer to the README for proper configuration. Missing required fields will cause errors.
Install the correct package: `npm install --save-dev graphql-codegen-generators@0.8.21` or migrate to @graphql-codegen/typescript.
Pass a single generator config or use the built-in 'types' generator directly: `generate({ schema, templates: types })`.Ensure the config object has a 'templates' property with an 'index' key containing the compiled Handlebars template string.
Provide a valid GraphQLSchema object from 'graphql' (e.g., buildSchema or buildClientSchema).