Skip to content

Commit dae1bda

Browse files
author
Anton Anisimov
committed
-> add | ability to get access to QuerySet in connection with custom resolver
1 parent 3b174a8 commit dae1bda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graphene_mongo/fields.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,8 @@ def default_resolver(self, _root, info, required_fields=None, resolved=None, **a
420420
)
421421
elif skip:
422422
items = items[skip:]
423-
iterables = list(items)
424-
list_length = len(iterables)
423+
iterables = items
424+
list_length = items.count()
425425

426426
elif callable(getattr(self.model, "objects", None)):
427427
if "pk__in" in args and args["pk__in"]:

0 commit comments

Comments
 (0)