@graphql-tools/load

Type aliases

Variables

Functions

Type aliases

LoadSchemaOptions

Ƭ LoadSchemaOptions: BuildSchemaOptions & LoadTypedefsOptions & Partial‹MergeSchemasConfig› & object

Defined in packages/load/src/schema.ts:7


LoadTypedefsOptions

Ƭ LoadTypedefsOptions: SingleFileOptions & ExtraConfig & object

Defined in packages/load/src/load-typedefs.ts:10


UnnormalizedTypeDefPointer

Ƭ UnnormalizedTypeDefPointer: object | string

Defined in packages/load/src/load-typedefs.ts:19

Variables

Const NON_OPERATION_KINDS

NON_OPERATION_KINDS: any[] = Object.keys(Kind) .reduce((prev, v) => [...prev, Kind[v]], []) .filter(v => !OPERATION_KINDS.includes(v))

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

Kinds of AST nodes that are included in type system definition documents


Const OPERATION_KINDS

OPERATION_KINDS: "OperationDefinition" | "FragmentDefinition"[] = [Kind.OPERATION_DEFINITION, Kind.FRAGMENT_DEFINITION]

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

Kinds of AST nodes that are included in executable documents

Functions

loadDocuments

loadDocuments(pointerOrPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[], options: LoadTypedefsOptions): Promise‹Source[]›

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

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:

NameTypeDescription
pointerOrPointersUnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[]Pointers to the files to load the documents from
optionsLoadTypedefsOptionsAdditional options

Returns: Promise‹Source[]›


loadDocumentsSync

loadDocumentsSync(pointerOrPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[], options: LoadTypedefsOptions): Source[]

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

Synchronously 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:

NameTypeDescription
pointerOrPointersUnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[]Pointers to the files to load the documents from
optionsLoadTypedefsOptionsAdditional options

Returns: Source[]


loadSchema

loadSchema(schemaPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[], options: LoadSchemaOptions): Promise‹GraphQLSchema›

Defined in packages/load/src/schema.ts:23

Asynchronously loads a schema from the provided pointers.

Parameters:

NameTypeDescription
schemaPointersUnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[]Pointers to the sources to load the schema from
optionsLoadSchemaOptionsAdditional options

Returns: Promise‹GraphQLSchema›


loadSchemaSync

loadSchemaSync(schemaPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[], options: LoadSchemaOptions): GraphQLSchema

Defined in packages/load/src/schema.ts:53

Synchronously loads a schema from the provided pointers.

Parameters:

NameTypeDescription
schemaPointersUnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[]Pointers to the sources to load the schema from
optionsLoadSchemaOptionsAdditional options

Returns: GraphQLSchema


loadTypedefs

loadTypedefsAdditionalConfig›(pointerOrPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[], options: LoadTypedefsOptions‹Partial‹AdditionalConfig››): Promise‹Source[]›

Defined in packages/load/src/load-typedefs.ts:28

Asynchronously loads any GraphQL documents (i.e. executable documents like operations and fragments as well as type system definitions) from the provided pointers.

Type parameters:

AdditionalConfig

Parameters:

NameTypeDescription
pointerOrPointersUnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[]Pointers to the sources to load the documents from
optionsLoadTypedefsOptions‹Partial‹AdditionalConfig››Additional options

Returns: Promise‹Source[]›


loadTypedefsSync

loadTypedefsSyncAdditionalConfig›(pointerOrPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[], options: LoadTypedefsOptions‹Partial‹AdditionalConfig››): Source[]

Defined in packages/load/src/load-typedefs.ts:73

Synchronously loads any GraphQL documents (i.e. executable documents like operations and fragments as well as type system definitions) from the provided pointers.

Type parameters:

AdditionalConfig

Parameters:

NameTypeDescription
pointerOrPointersUnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[]Pointers to the sources to load the documents from
optionsLoadTypedefsOptions‹Partial‹AdditionalConfig››Additional options

Returns: Source[]