Fast, experimental GraphQL TypeScript code generator that generates TypeScript code for GraphQL operations and fragments. Version 0.1.0, actively developed but still in beta. Key differentiators: claims to be at least 100x faster than graphql-codegen, generates readable types, supports stateful incremental generation (only rebuilds changed types), can output single .ts or separate .js/.d.ts files, adds TypeDoc comments. Caveats: experimental, may have bugs. Depends on graphql and @graphql-tools/load.
npm install graphql-typescript-deluxeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Constructs a Generator with a GraphQL schema, adds a query document, builds the output, and prints the generated TypeScript code string.
Always pass a valid GraphQLSchema object to new Generator(schema).
Use the stateful Generator class and call .build() instead.
Use parse() from the graphql package before calling generator.add().
Ensure each filePath is unique across documents.
Call generator.build() fresh when needed.
Review generated types for correctness and report bugs to the project.
Ensure you import Generator correctly: import { Generator } from 'graphql-typescript-deluxe' and instantiate with new Generator(schema).Pass a valid schema: const generator = new Generator(schema)
Parse your GraphQL string first: import { parse } from 'graphql'; generator.add({ documentNode: parse(doc), filePath: 'file.graphql' })