@baeta/generator
Classes
Watcher
Constructors
new Watcher()
new Watcher(
cwd
,options
?):Watcher
Parameters
Parameter | Type |
---|---|
|
|
|
|
Returns
Methods
close()
close():
Promise
<void
>
Returns
Promise
<void
>
createSubscription()
createSubscription():
object
Returns
object
Name | Type |
---|---|
unsubscribe | () => Promise <void > |
ignore()
ignore(
pattern
):void
Parameters
Parameter | Type |
---|---|
|
Returns
void
off()
off(
event
,listener
):void
Parameters
Parameter | Type |
---|---|
|
|
|
Returns
void
on()
on(
event
,listener
):void
Parameters
Parameter | Type |
---|---|
|
|
|
Returns
void
onEvents()
onEvents(
err
,events
):void
Parameters
Parameter | Type |
---|---|
|
|
|
|
Returns
void
unignore()
unignore(
pattern
):void
Parameters
Parameter | Type |
---|---|
|
Returns
void
Interfaces
GeneratorHooks
Properties
Property | Type |
---|---|
|
() => |
|
( |
|
( |
|
( |
|
() => |
GeneratorOptions
Options for the Baeta Generator.
Properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
|
Glob pattern(s) to locate GraphQL schema files. |
|
|
|
Output path for the generated base types file. |
|
|
|
Path to the context type definition. Supports both named and default exports. Examples
|
|
|
|
Current working directory for resolving relative paths. |
|
|
|
Path to Baeta Extensions (ex. auth-extension). Only default export is supported. Example
|
|
|
Configuration options for generated files. | |
|
|
|
File extension to use in generated import statements. Set to false to omit extensions. |
|
|
|
Custom schema loaders for processing schema files. |
|
|
|
Filename for the generated module definition file. Contains type definitions and the GraphQL AST. |
|
|
|
Root directory where GraphQL modules are defined. |
|
|
|
Custom scalar type mappings. Maps GraphQL scalar types to TypeScript types. Supports global types and imports. Example
|
GeneratorPluginV1<Store>
Type Parameters
Type Parameter | Default type |
---|---|
|
|
Properties
Property | Type |
---|---|
|
|
|
|
|
|
|
|
|
|
| |
| |
|
WatcherFile
Properties
Property | Type |
---|---|
|
|
|
|
|
|
Type Aliases
WatcherListener()
WatcherListener: (
path
) =>void
Parameters
Parameter | Type |
---|---|
|
Returns
void
Functions
generate()
generate(
options
,plugins
,hooks
?):Promise
<undefined
| {didEnd
:string
[];didGenerate
:string
[];didSetup
:string
[];fileManager
:FileManager
;generatorOptions
:NormalizedGeneratorOptions
;pluginNames
:string
[];watching
:boolean
;changedFile
:WatcherFile
; }>
Parameters
Parameter | Type |
---|---|
| |
|
|
|
Returns
Promise
<undefined
| { didEnd
: string
[]; didGenerate
: string
[]; didSetup
: string
[]; fileManager
: FileManager
; generatorOptions
: NormalizedGeneratorOptions
; pluginNames
: string
[]; watching
: boolean
; changedFile
: WatcherFile
; }>
generateAndWatch()
generateAndWatch(
options
,plugins
,hooks
?):Watcher
Parameters
Parameter | Type |
---|---|
| |
|
|
|
Returns
getGeneratorPlugins()
getGeneratorPlugins(
plugins
?):GeneratorPluginV1
<unknown
>[]
Parameters
Parameter | Type |
---|---|
|
|
Returns
GeneratorPluginV1
<unknown
>[]