Skip to content

Commit 0ccc1a5

Browse files
committed
Use Object.create(null) to avoid prototype issues
Replicates graphql/graphql-js@13f130d
1 parent 12bcb49 commit 0ccc1a5

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

src/graphql/validation/rules/values_of_correct_type.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
ObjectValueNode,
1313
StringValueNode,
1414
ValueNode,
15-
VariableDefinitionNode,
1615
VisitorAction,
1716
SKIP,
1817
print_ast,
@@ -43,18 +42,6 @@ class ValuesOfCorrectTypeRule(ValidationRule):
4342
See https://spec.graphql.org/draft/#sec-Values-of-Correct-Type
4443
"""
4544

46-
def __init__(self, context: ValidationContext) -> None:
47-
super().__init__(context)
48-
self.variable_definitions: dict[str, VariableDefinitionNode] = {}
49-
50-
def enter_operation_definition(self, *_args: Any) -> None:
51-
self.variable_definitions.clear()
52-
53-
def enter_variable_definition(
54-
self, definition: VariableDefinitionNode, *_args: Any
55-
) -> None:
56-
self.variable_definitions[definition.variable.name.value] = definition
57-
5845
def enter_list_value(self, node: ListValueNode, *_args: Any) -> VisitorAction:
5946
# Note: TypeInfo will traverse into a list's item type, so look to the parent
6047
# input type to check if it is a list.

0 commit comments

Comments
 (0)