UNPKG

881 BTypeScriptView Raw
1import type { GraphQLSchemaValidationOptions } from '../type/schema';
2import { GraphQLSchema } from '../type/schema';
3import type { IntrospectionQuery } from './getIntrospectionQuery';
4/**
5 * Build a GraphQLSchema for use by client tools.
6 *
7 * Given the result of a client running the introspection query, creates and
8 * returns a GraphQLSchema instance which can be then used with all graphql-js
9 * tools, but cannot be used to execute a query, as introspection does not
10 * represent the "resolver", "parse" or "serialize" functions or any other
11 * server-internal mechanisms.
12 *
13 * This function expects a complete introspection result. Don't forget to check
14 * the "errors" field of a server response before calling this function.
15 */
16export declare function buildClientSchema(
17 introspection: IntrospectionQuery,
18 options?: GraphQLSchemaValidationOptions,
19): GraphQLSchema;