mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-13 17:52:19 +03:00
fixed resolve connection
This commit is contained in:
parent
2465b1ab20
commit
a913ed3c2b
|
@ -31,7 +31,7 @@ class DjangoListField(Field):
|
|||
|
||||
class DjangoConnectionField(ConnectionField):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.on = kwargs.pop("on", "nodes")
|
||||
self.on = "nodes"
|
||||
self.max_limit = kwargs.pop(
|
||||
"max_limit", graphene_settings.RELAY_CONNECTION_MAX_LIMIT
|
||||
)
|
||||
|
@ -81,13 +81,7 @@ class DjangoConnectionField(ConnectionField):
|
|||
if iterable is None:
|
||||
iterable = default_manager
|
||||
iterable = maybe_queryset(iterable)
|
||||
if isinstance(iterable, NodeSet):
|
||||
if iterable is not default_manager:
|
||||
default_queryset = maybe_queryset(default_manager)
|
||||
iterable = cls.merge_querysets(default_queryset, iterable)
|
||||
_len = iterable.count()
|
||||
else:
|
||||
_len = len(iterable)
|
||||
_len = len(iterable)
|
||||
connection = connection_from_list_slice(
|
||||
iterable,
|
||||
args,
|
||||
|
|
Loading…
Reference in New Issue
Block a user