Skip to main content
Version: Next (2.x)

GeneratorOptions

Options for the Baeta Generator.

Properties

PropertyTypeDefault valueDescription

schemas

string[]

["src/∗∗/∗.gql", "src/∗∗/∗.graphql"];

Glob pattern(s) to locate GraphQL schema files.

cwd?

string

process.cwd();

Current working directory for resolving relative paths.

fileOptions?

FileOptions

undefined

Configuration options for generated files.

importExtension?

false | ".js" | ".ts"

".ts";

File extension to use in generated import statements. Set to false to omit extensions.

loaders?

Loader<any>[]

undefined

Custom schema loaders for processing schema files.

moduleDefinitionName?

string

"typedef.ts";

Filename for the generated module definition file. Contains type definitions and the GraphQL AST.

modulesDir?

string

"src/modules";

Root directory where GraphQL modules are defined.

typesDir?

string

`${modulesDir}/../__generated__/types.ts`;

Output path for the generated type files.