def validate_sdl(
    document_ast: DocumentNode,
    schema_to_extend: GraphQLSchema = None,
    rules: Sequence[RuleType] = None,
) -> List[GraphQLError]:
    """Validate an SDL document."""
    context = SDLValidationContext(document_ast, schema_to_extend)
    if rules is None:
        rules = specified_sdl_rules
    visitors = [rule(context) for rule in rules]
    visit(document_ast, ParallelVisitor(visitors))
    return context.errors
def validate_sdl ( document_ast : DocumentNode , schema_to_extend : GraphQLSchema = None , rules : Sequence [ RuleType ] = None , ) -> List [ GraphQLError ] : context = SDLValidationContext ( document_ast , schema_to_extend ) if rules is None : rules = specified_sdl_rules visitors = [ rule ( context ) for rule in rules ] visit ( document_ast , ParallelVisitor ( visitors ) ) return context . errors
Validate an SDL document.