This package is the legacy compiler engine for GraphQL Code Generator v0.x, used to process GraphQL schemas and generate TypeScript types, React hooks, or other artifacts. The current stable version is 0.13.0, which is part of the now-deprecated v0.x line. It was replaced by `@graphql-codegen/cli` and `@graphql-codegen/plugin-helpers` in GraphQL Code Generator v1+, which introduced a new plugin-based architecture. This compiler is not compatible with v1+ plugins and should not be used in new projects. Key differentiator: it is a monolithic compiler that takes a schema and outputs code through a single pipeline, unlike the modular v1+ system that uses independent plugins.
npm install graphql-codegen-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a GraphQLCodegenCompiler instance, builds a schema, compiles it to TypeScript types.
Migrate to GraphQL Code Generator v1+ using `@graphql-codegen/cli` and the appropriate plugins (e.g., `@graphql-codegen/typescript`).
Always provide an array for the 'plugins' option, even if empty.
Pin graphql@14 as a dependency when using this compiler.
Use `const GraphQLCodegenCompiler = require('graphql-codegen-compiler');` then call `new GraphQLCodegenCompiler().compile(...)`.Run `npm install graphql-codegen-compiler graphql@14` and use import syntax (ESM) or `const X = require('graphql-codegen-compiler').default` (CJS fallback).Use `buildSchema()` from 'graphql' to convert your schema definition to a GraphQLSchema object before passing to compile.