Skip to Content
GraphQL Tools
DocumentationAPI@graphql-tools/loadsrcfunctionsloadDocuments

Function: loadDocuments()

loadDocuments(pointerOrPointers, options): Promise<Source[]>

Defined in: packages/load/src/documents.ts:32

Asynchronously loads executable documents (i.e. operations and fragments) from the provided pointers. The pointers may be individual files or a glob pattern. The files themselves may be .graphql files or .js and .ts (in which case they will be parsed using graphql-tag-pluck).

Parameters

pointerOrPointers

UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[]

Pointers to the files to load the documents from

options

LoadTypedefsOptions

Additional options

Returns

Promise<Source[]>