mirror of
https://github.com/graphql-python/graphene.git
synced 2025-07-24 23:09:46 +03:00
Get proper connection type for SimpleConnection
This commit is contained in:
parent
6553d4554b
commit
631fa23249
|
@ -46,6 +46,10 @@ class ConnectionField(Field):
|
|||
|
||||
def get_connection_type(self, node):
|
||||
connection_type = self.connection_type or node.get_connection_type()
|
||||
|
||||
if issubclass(connection_type, SimpleConnection):
|
||||
return connection_type.for_node(node)
|
||||
|
||||
edge_type = self.get_edge_type(node)
|
||||
return connection_type.for_node(node, edge_type=edge_type)
|
||||
|
||||
|
@ -105,3 +109,5 @@ class GlobalIDField(Field):
|
|||
|
||||
def resolver(self, instance, args, info):
|
||||
return instance.to_global_id()
|
||||
|
||||
from .types import SimpleConnection
|
||||
|
|
Loading…
Reference in New Issue
Block a user