Skip to main content

@baeta/plugin-autoload

Interfaces

AutoloadModuleOptions

Properties

PropertyTypeDescription

match?

(moduleName: string) => boolean

Custom function to determine if a module should be included


AutoloadPluginOptions

Properties

PropertyTypeDefault valueDescription

modules?

boolean | AutoloadModuleOptions

undefined

Configuration for module autoloading. Set to false to disable

output?

string

`${modulesDir}/autoload.ts`;

Output path for the generated autoload file

resolvers?

boolean | AutoloadResolverOptions

undefined

Configuration for resolver autoloading. Set to false to disable


AutoloadResolverOptions

Properties

PropertyTypeDescription

disableDefaultSuffixes?

boolean

If true, disables the default resolver suffixes

match?

(filename: string) => boolean

Custom function to determine if a resolver file should be included

suffix?

string | string[]

Custom suffix(es) to identify resolver files Used together with the default suffixes, unless disabled

Functions

autoloadPlugin()

autoloadPlugin(options?): GeneratorPluginV1<unknown>

A plugin that automatically loads GraphQL resolvers and modules based on file names. See https://baeta.io/docs/plugins/autoloading

Parameters

ParameterTypeDescription

options?

AutoloadPluginOptions

Configuration options for the autoload plugin

Returns

GeneratorPluginV1<unknown>

A Baeta generator plugin