Fixed return ConnectionType instance in ConnectionField resolver

This commit is contained in:
Syrus Akbary 2015-11-22 16:04:14 -08:00
parent a7cf71fdd0
commit fe860774e8

View File

@ -30,7 +30,8 @@ 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):
if isinstance(resolved, connection_type):
return resolved
return connection_type.from_list(resolved, args, info)
def get_connection_type(self, node):