Directories
¶
| Path | Synopsis |
|---|---|
|
Package cli ports config.ts's buildOptions()/parseArgv() — the yargs flag definitions — onto cobra.
|
Package cli ports config.ts's buildOptions()/parseArgv() — the yargs flag definitions — onto cobra. |
|
Package config ports config.ts's config discovery + loading: it finds a codegen config file (codegen.yml/codegen.json/package.json), parses it, and exposes a CodegenContext that carries the config plus CLI-flag overrides.
|
Package config ports config.ts's config discovery + loading: it finds a codegen config file (codegen.yml/codegen.json/package.json), parses it, and exposes a CodegenContext that carries the config plus CLI-flag overrides. |
|
Package core ports @graphql-codegen/core's codegen(): it runs a plugin chain over a resolved schema + documents and concatenates the output, hoisting prepend/append blocks.
|
Package core ports @graphql-codegen/core's codegen(): it runs a plugin chain over a resolved schema + documents and concatenates the output, hoisting prepend/append blocks. |
|
Package generate ports the orchestration between the CLI and core: executeCodegen (codegen.ts) — for each `generates` entry, load schema + documents, run the plugin chain, and collect FileOutputs.
|
Package generate ports the orchestration between the CLI and core: executeCodegen (codegen.ts) — for each `generates` entry, load schema + documents, run the plugin chain, and collect FileOutputs. |
|
Package gqlutil holds thin helpers over gqlparser's AST, mirroring the graphql-js type helpers that the TS plugins lean on.
|
Package gqlutil holds thin helpers over gqlparser's AST, mirroring the graphql-js type helpers that the TS plugins lean on. |
|
Package interpolation ports the string-env-interpolation npm package: it expands ${VAR} and ${VAR:-default} in config file content before parsing.
|
Package interpolation ports the string-env-interpolation npm package: it expands ${VAR} and ${VAR:-default} in config file content before parsing. |
|
Package load ports load.ts: schema and document loading from file pointers and globs, backed by gqlparser.
|
Package load ports load.ts: schema and document loading from file pointers and globs, backed by gqlparser. |
|
Package normalize ports the normalize* helpers from @graphql-codegen/plugin-helpers/src/helpers.ts and utils.ts.
|
Package normalize ports the normalize* helpers from @graphql-codegen/plugin-helpers/src/helpers.ts and utils.ts. |
|
Package plugin defines the core contracts shared by the CLI, core orchestration, and the compiled-in plugins: the Plugin/Preset interfaces and the config types (mirroring @graphql-codegen/plugin-helpers' Types namespace).
|
Package plugin defines the core contracts shared by the CLI, core orchestration, and the compiled-in plugins: the Plugin/Preset interfaces and the config types (mirroring @graphql-codegen/plugin-helpers' Types namespace). |
|
plugins
|
|
|
add
Package add ports @graphql-codegen/add: it injects arbitrary content before (prepend) or after (append) the generated output.
|
Package add ports @graphql-codegen/add: it injects arbitrary content before (prepend) or after (append) the generated output. |
|
fragmentmasking
Package fragmentmasking ports the client preset's fragment-masking plugin: it emits fragment-masking.ts (FragmentType, useFragment, makeFragmentData, isFragmentReady helpers).
|
Package fragmentmasking ports the client preset's fragment-masking plugin: it emits fragment-masking.ts (FragmentType, useFragment, makeFragmentData, isFragmentReady helpers). |
|
gqltagoperations
Package gqltagoperations ports @graphql-codegen/gql-tag-operations — the "gen-dts" plugin used by the client preset to emit gql.ts (the Documents registry + graphql() function with typed overloads).
|
Package gqltagoperations ports @graphql-codegen/gql-tag-operations — the "gen-dts" plugin used by the client preset to emit gql.ts (the Documents registry + graphql() function with typed overloads). |
|
schemaast
Package schemaast ports @graphql-codegen/schema-ast: it prints the merged schema as SDL.
|
Package schemaast ports @graphql-codegen/schema-ast: it prints the merged schema as SDL. |
|
typeddocumentnode
Package typeddocumentnode ports @graphql-codegen/typed-document-node: it serializes each operation/fragment into a JSON-literal DocumentNode (documentMode: documentNodeImportFragments) with a TypedDocumentNode type signature, byte-identical to upstream's output.
|
Package typeddocumentnode ports @graphql-codegen/typed-document-node: it serializes each operation/fragment into a JSON-literal DocumentNode (documentMode: documentNodeImportFragments) with a TypedDocumentNode type signature, byte-identical to upstream's output. |
|
typescript
Package typescript ports @graphql-codegen/typescript: it generates base TypeScript types from a GraphQL schema.
|
Package typescript ports @graphql-codegen/typescript: it generates base TypeScript types from a GraphQL schema. |
|
typescriptoperations
Package typescriptoperations ports @graphql-codegen/typescript-operations: it generates TypeScript types for the GraphQL operations (queries, mutations, subscriptions, fragments) — the selection-set → object-type lowering.
|
Package typescriptoperations ports @graphql-codegen/typescript-operations: it generates TypeScript types for the GraphQL operations (queries, mutations, subscriptions, fragments) — the selection-set → object-type lowering. |
|
typescriptresolvers
Package typescriptresolvers ports @graphql-codegen/typescript-resolvers: it generates TypeScript resolver signatures from a GraphQL schema, including the ResolversTypes/ResolversParentTypes mappings, per-type XxxResolvers blocks, and the root Resolvers type.
|
Package typescriptresolvers ports @graphql-codegen/typescript-resolvers: it generates TypeScript resolver signatures from a GraphQL schema, including the ResolversTypes/ResolversParentTypes mappings, per-type XxxResolvers blocks, and the root Resolvers type. |
|
presets
|
|
|
client
Package client ports @graphql-codegen/client-preset: the "client" preset fans one `generates` entry into graphql.ts, gql.ts, fragment-masking.ts and index.ts, byte-identical to upstream.
|
Package client ports @graphql-codegen/client-preset: the "client" preset fans one `generates` entry into graphql.ts, gql.ts, fragment-masking.ts and index.ts, byte-identical to upstream. |
|
nearoperationfile
Package nearoperationfile ports @graphql-codegen/near-operation-file-preset: generates one .ts file per operation document next to the source file, importing base types from a shared types file.
|
Package nearoperationfile ports @graphql-codegen/near-operation-file-preset: generates one .ts file per operation document next to the source file, importing base types from a shared types file. |
|
Package registry blank-imports every compiled-in plugin and preset so their init() functions register with the plugin.Registry.
|
Package registry blank-imports every compiled-in plugin and preset so their init() functions register with the plugin.Registry. |
|
Package visitor ports the shared pieces of @graphql-codegen/visitor-plugin-common: naming conventions, scalar resolution, and the DeclarationBlock code writer.
|
Package visitor ports the shared pieces of @graphql-codegen/visitor-plugin-common: naming conventions, scalar resolution, and the DeclarationBlock code writer. |
|
Package watch ports utils/watcher.ts: a file watcher that re-runs codegen when schema/documents/config change, backed by fsnotify.
|
Package watch ports utils/watcher.ts: a file watcher that re-runs codegen when schema/documents/config change, backed by fsnotify. |
Click to show internal directories.
Click to hide internal directories.