Skip to main content

@graphql-tools/load-files

Functions#

Functions#

loadFiles#

loadFiles(pattern: string | string[], options?: LoadFilesOptions): Promise<any[]\>

Asynchronously loads files using the provided glob pattern.

Parameters#

NameTypeDescription
patternstring | string[]Glob pattern or patterns to use when loading files
optionsLoadFilesOptionsAdditional options

Returns: Promise<any[]\>

Defined in: packages/load-files/src/index.ts:207


loadFilesSync#

loadFilesSync<T\>(pattern: string | string[], options?: LoadFilesOptions): T[]

Synchronously loads files using the provided glob pattern.

Type parameters#

NameDefault
Tany

Parameters#

NameTypeDescription
patternstring | string[]Glob pattern or patterns to use when loading files
optionsLoadFilesOptionsAdditional options

Returns: T[]

Defined in: packages/load-files/src/index.ts:124