Catch the highlights of GraphQLConf 2023! Click for recordings. Or check out our recap blog post.
Docs
API Reference
Packages
load-files

@graphql-tools/load-files

Interfaces

Functions

Functions

loadFiles

loadFiles(pattern, options?): Promise<any[]>

Asynchronously loads files using the provided glob pattern.

Parameters

NameTypeDefault valueDescription
patternstring | string[]undefinedGlob pattern or patterns to use when loading files
optionsLoadFilesOptionsLoadFilesDefaultOptionsAdditional options

Returns

Promise<any[]>

Defined in

packages/load-files/src/index.ts:230


loadFilesSync

loadFilesSync<T>(pattern, options?): T[]

Synchronously loads files using the provided glob pattern.

Type parameters

NameType
Tany

Parameters

NameTypeDefault valueDescription
patternstring | string[]undefinedGlob pattern or patterns to use when loading files
optionsLoadFilesOptionsLoadFilesDefaultOptionsAdditional options

Returns

T[]

Defined in

packages/load-files/src/index.ts:132