Skip to content

Commit fe86077

Browse files
committed
Fixed return ConnectionType instance in ConnectionField resolver
1 parent a7cf71f commit fe86077

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

graphene/relay/fields.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ def resolver(self, instance, args, info):
3030
schema = info.schema.graphene_schema
3131
connection_type = self.get_type(schema)
3232
resolved = super(ConnectionField, self).resolver(instance, args, info)
33-
if not isinstance(resolved, connection_type):
34-
return connection_type.from_list(resolved, args, info)
33+
if isinstance(resolved, connection_type):
34+
return resolved
35+
return connection_type.from_list(resolved, args, info)
3536

3637
def get_connection_type(self, node):
3738
connection_type = self.connection_type or node.get_connection_type()

0 commit comments

Comments
 (0)