mirror of
https://github.com/graphql-python/graphene.git
synced 2025-07-24 23:09:46 +03:00
Update types.py
This commit is contained in:
parent
576c3b1092
commit
8749047565
|
@ -77,7 +77,7 @@ class Connection(ObjectType):
|
|||
@classmethod
|
||||
@memoize
|
||||
def for_node(cls, node, edge_type=None, root_values=None):
|
||||
from graphene.relay.utils import is_node
|
||||
from graphene.relay.utils import is_node, is_node_type
|
||||
edge_type = edge_type or Edge.for_node(node)
|
||||
assert is_node(node) or is_node_type(node), 'ObjectTypes in a connection have to be Nodes'
|
||||
edges = List(edge_type, description='Information to aid in pagination.')
|
||||
|
|
Loading…
Reference in New Issue
Block a user