We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42b93b5 commit 3fa65aaCopy full SHA for 3fa65aa
graphene/relay/connection.py
@@ -95,6 +95,10 @@ class Connection(six.with_metaclass(ConnectionMeta, ObjectType)):
95
def Field(cls, *args, **kwargs): # noqa: N802
96
return ConnectionField(cls, *args, **kwargs)
97
98
+ @classmethod
99
+ def is_type_of(cls, root, context, info):
100
+ return isinstance(root, cls)
101
+
102
@classmethod
103
def connection_resolver(cls, resolved, args, context, info):
104
assert isinstance(resolved, Iterable), (
@@ -132,7 +136,7 @@ def __init__(self, type, *args, **kwargs):
132
136
def connection_resolver(cls, resolver, connection_type, root, args, context, info):
133
137
resolved = resolver(root, args, context, info)
134
138
135
- if isinstance(resolved, connection_type):
139
+ if connection_type.is_type_of(resolved, context, info):
140
return resolved
141
142
on_resolve = partial(connection_type.connection_resolver, args=args, context=context, info=info)
0 commit comments