28
28
29
29
30
30
def build_ast_schema (
31
- ast : DocumentNode , assume_valid : bool = False ,
31
+ document_ast : DocumentNode , assume_valid : bool = False ,
32
32
assume_valid_sdl : bool = False ) -> GraphQLSchema :
33
33
"""Build a GraphQL Schema from a given AST.
34
34
@@ -46,12 +46,12 @@ def build_ast_schema(
46
46
to assume the produced schema is valid. Set `assume_valid_sdl` to True to
47
47
assume it is already a valid SDL document.
48
48
"""
49
- if not isinstance (ast , DocumentNode ):
49
+ if not isinstance (document_ast , DocumentNode ):
50
50
raise TypeError ('Must provide a Document AST.' )
51
51
52
52
if not (assume_valid or assume_valid_sdl ):
53
53
from ..validation .validate import assert_valid_sdl
54
- assert_valid_sdl (ast )
54
+ assert_valid_sdl (document_ast )
55
55
56
56
schema_def : Optional [SchemaDefinitionNode ] = None
57
57
type_defs : List [TypeDefinitionNode ] = []
@@ -66,7 +66,7 @@ def build_ast_schema(
66
66
EnumTypeDefinitionNode ,
67
67
UnionTypeDefinitionNode ,
68
68
InputObjectTypeDefinitionNode )
69
- for d in ast .definitions :
69
+ for d in document_ast .definitions :
70
70
if isinstance (d , SchemaDefinitionNode ):
71
71
schema_def = d
72
72
elif isinstance (d , type_definition_nodes ):
0 commit comments