graphql/type/validate.py
def validate_schema(schema: GraphQLSchema) -> List[GraphQLError]:
    """Validate a GraphQL schema.

    Implements the "Type Validation" sub-sections of the specification's "Type System"
    section.

    Validation runs synchronously, returning a list of encountered errors, or an empty
    list if no errors were encountered and the Schema is valid.
    """
    # First check to ensure the provided value is in fact a GraphQLSchema.
    if not is_schema(schema):
        raise TypeError(f"Expected {inspect(schema)} to be a GraphQL schema.")

    # If this Schema has already been validated, return the previous results.
    # noinspection PyProtectedMember
    errors = schema._validation_errors
    if errors is None:

        # Validate the schema, producing a list of errors.
        context = SchemaValidationContext(schema)
        context.validate_root_types()
        context.validate_directives()
        context.validate_types()

        # Persist the results of validation before returning to ensure validation does
        # not run multiple times for this schema.
        errors = context.errors
        schema._validation_errors = errors

    return errors
Validate a GraphQL schema.

    Implements the "Type Validation" sub-sections of the specification's "Type System"
    section.

    Validation runs synchronously, returning a list of encountered errors, or an empty
    list if no errors were encountered and the Schema is valid.
    
Validate a GraphQL schema.
Implements the "Type Validation" sub-sections of the specification's "Type System"
section.

Validation runs synchronously, returning a list of encountered errors, or an empty
list if no errors were encountered and the Schema is valid.
Validate a GraphQL schema . Implements the " Type Validation " sub - sections of the specification ' s " Type System " section . Validation runs synchronously returning a list of encountered errors or an empty list if no errors were encountered and the Schema is valid .
def validate_schema(schema: GraphQLSchema) -> List[GraphQLError]:
    if not is_schema(schema):
        raise TypeError(f"Expected {inspect(schema)} to be a GraphQL schema.")
    errors = schema._validation_errors
    if errors is None:
        context = SchemaValidationContext(schema)
        context.validate_root_types()
        context.validate_directives()
        context.validate_types()
        errors = context.errors
        schema._validation_errors = errors
    return errors
def validate_schema ( schema : GraphQLSchema ) -> List [ GraphQLError ] : if not is_schema ( schema ) : raise TypeError ( f"Expected {inspect(schema)} to be a GraphQL schema." ) errors = schema . _validation_errors if errors is None : context = SchemaValidationContext ( schema ) context . validate_root_types ( ) context . validate_directives ( ) context . validate_types ( ) errors = context . errors schema . _validation_errors = errors return errors
Validate a GraphQL schema.
Validate a GraphQL schema .
"""Validate a GraphQL schema.

    Implements the "Type Validation" sub-sections of the specification's "Type System"
    section.

    Validation runs synchronously, returning a list of encountered errors, or an empty
    list if no errors were encountered and the Schema is valid.
    """ # First check to ensure the provided value is in fact a GraphQLSchema. # If this Schema has already been validated, return the previous results. # noinspection PyProtectedMember # Validate the schema, producing a list of errors. # Persist the results of validation before returning to ensure validation does # not run multiple times for this schema.
schema
GraphQLSchema