UNPKG

633 BTypeScriptView Raw
1import { GraphQLError } from '../error/GraphQLError';
2import type { GraphQLSchema } from './schema';
3/**
4 * Implements the "Type Validation" sub-sections of the specification's
5 * "Type System" section.
6 *
7 * Validation runs synchronously, returning an array of encountered errors, or
8 * an empty array if no errors were encountered and the Schema is valid.
9 */
10export declare function validateSchema(
11 schema: GraphQLSchema,
12): ReadonlyArray<GraphQLError>;
13/**
14 * Utility function which asserts a schema is valid by throwing an error if
15 * it is invalid.
16 */
17export declare function assertValidSchema(schema: GraphQLSchema): void;