mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-26 11:33:55 +03:00
Added more info to the connections
This commit is contained in:
parent
a55741b03c
commit
a056acba62
|
@ -32,7 +32,7 @@ class DjangoConnectionField(ConnectionField):
|
|||
_len = iterable.count()
|
||||
else:
|
||||
_len = len(iterable)
|
||||
return connection_from_list_slice(
|
||||
connection = connection_from_list_slice(
|
||||
iterable,
|
||||
args,
|
||||
slice_start=0,
|
||||
|
@ -41,6 +41,9 @@ class DjangoConnectionField(ConnectionField):
|
|||
connection_type=connection,
|
||||
edge_type=connection.Edge,
|
||||
)
|
||||
connection.iterable = iterable
|
||||
connection.length = _len
|
||||
return connection
|
||||
|
||||
def get_resolver(self, parent_resolver):
|
||||
return partial(self.connection_resolver, parent_resolver, self.type, self.get_manager())
|
||||
|
|
|
@ -131,6 +131,7 @@ class IterableConnectionField(Field):
|
|||
edge_type=connection.Edge,
|
||||
pageinfo_type=PageInfo
|
||||
)
|
||||
connection.iterable = iterable
|
||||
return connection
|
||||
|
||||
def get_resolver(self, parent_resolver):
|
||||
|
|
Loading…
Reference in New Issue
Block a user