2828
2929
3030def build_ast_schema (
31- ast : DocumentNode , assume_valid : bool = False ,
31+ document_ast : DocumentNode , assume_valid : bool = False ,
3232 assume_valid_sdl : bool = False ) -> GraphQLSchema :
3333 """Build a GraphQL Schema from a given AST.
3434
@@ -46,12 +46,12 @@ def build_ast_schema(
4646 to assume the produced schema is valid. Set `assume_valid_sdl` to True to
4747 assume it is already a valid SDL document.
4848 """
49- if not isinstance (ast , DocumentNode ):
49+ if not isinstance (document_ast , DocumentNode ):
5050 raise TypeError ('Must provide a Document AST.' )
5151
5252 if not (assume_valid or assume_valid_sdl ):
5353 from ..validation .validate import assert_valid_sdl
54- assert_valid_sdl (ast )
54+ assert_valid_sdl (document_ast )
5555
5656 schema_def : Optional [SchemaDefinitionNode ] = None
5757 type_defs : List [TypeDefinitionNode ] = []
@@ -66,7 +66,7 @@ def build_ast_schema(
6666 EnumTypeDefinitionNode ,
6767 UnionTypeDefinitionNode ,
6868 InputObjectTypeDefinitionNode )
69- for d in ast .definitions :
69+ for d in document_ast .definitions :
7070 if isinstance (d , SchemaDefinitionNode ):
7171 schema_def = d
7272 elif isinstance (d , type_definition_nodes ):
0 commit comments