Skip to content

Commit b9c996e

Browse files
committed
Implement __hash__ methods on GraphQLField and GraphQLArgument.
1 parent 2710da4 commit b9c996e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

graphql/core/execution/executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
GraphQLScalarType, GraphQLUnionType
1212
from ..validation import validate
1313
from .base import ExecutionContext, ExecutionResult, ResolveInfo, Undefined, collect_fields, default_resolve_fn, \
14-
get_argument_values, get_field_def, get_operation_root_type
14+
get_field_def, get_operation_root_type
1515

1616

1717
class Executor(object):

graphql/core/type/definition.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,9 @@ def __eq__(self, other):
317317
)
318318
)
319319

320+
def __hash__(self):
321+
return id(self)
322+
320323

321324
class GraphQLArgument(object):
322325
__slots__ = 'name', 'type', 'default_value', 'description'
@@ -338,6 +341,9 @@ def __eq__(self, other):
338341
)
339342
)
340343

344+
def __hash__(self):
345+
return id(self)
346+
341347

342348
class GraphQLInterfaceType(GraphQLType):
343349
"""Interface Type Definition

0 commit comments

Comments
 (0)