mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-26 19:43:56 +03:00
Fixed return ConnectionType instance in ConnectionField resolver
This commit is contained in:
parent
a7cf71fdd0
commit
fe860774e8
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user