From fe860774e8525cb50095f857c6013cffbc41f117 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Sun, 22 Nov 2015 16:04:14 -0800 Subject: [PATCH] Fixed return ConnectionType instance in ConnectionField resolver --- graphene/relay/fields.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/graphene/relay/fields.py b/graphene/relay/fields.py index a54140ee..b3829ad8 100644 --- a/graphene/relay/fields.py +++ b/graphene/relay/fields.py @@ -30,8 +30,9 @@ class ConnectionField(Field): schema = info.schema.graphene_schema connection_type = self.get_type(schema) resolved = super(ConnectionField, self).resolver(instance, args, info) - if not isinstance(resolved, connection_type): - return connection_type.from_list(resolved, args, info) + if isinstance(resolved, connection_type): + return resolved + return connection_type.from_list(resolved, args, info) def get_connection_type(self, node): connection_type = self.connection_type or node.get_connection_type()