MCPcopy
hub / github.com/graphql/graphql-js / assertValidSchema

Function assertValidSchema

src/type/validate.ts:136–141  ·  view source on GitHub ↗
(schema: GraphQLSchema)

Source from the content-addressed store, hash-verified

134 * ```
135 */
136export function assertValidSchema(schema: GraphQLSchema): void {
137 const errors = validateSchema(schema);
138 if (errors.length !== 0) {
139 throw new Error(errors.map((error) => error.message).join('\n\n'));
140 }
141}
142
143class SchemaValidationContext {
144 readonly _errors: Array<GraphQLError>;

Callers 3

validateImplFunction · 0.90
validation-test.tsFile · 0.90
validateExecutionArgsFunction · 0.90

Calls 1

validateSchemaFunction · 0.85

Tested by

no test coverage detected