UNPKG

1.14 kBTypeScriptView Raw
1import { LoadTypedefsOptions, UnnormalizedTypeDefPointer } from './load-typedefs';
2import { GraphQLSchema, BuildSchemaOptions } from 'graphql';
3import { MergeSchemasConfig } from '@graphql-tools/merge';
4export declare type LoadSchemaOptions = BuildSchemaOptions & LoadTypedefsOptions & Partial<MergeSchemasConfig> & {
5 /**
6 * Adds a list of Sources in to `extensions.sources`
7 *
8 * Disabled by default.
9 */
10 includeSources?: boolean;
11};
12/**
13 * Asynchronously loads a schema from the provided pointers.
14 * @param schemaPointers Pointers to the sources to load the schema from
15 * @param options Additional options
16 */
17export declare function loadSchema(schemaPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[], options: LoadSchemaOptions): Promise<GraphQLSchema>;
18/**
19 * Synchronously loads a schema from the provided pointers.
20 * @param schemaPointers Pointers to the sources to load the schema from
21 * @param options Additional options
22 */
23export declare function loadSchemaSync(schemaPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[], options: LoadSchemaOptions): GraphQLSchema;