Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: changes count to len #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions graphene_django_pagination/connection_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ def resolve_total_count(self, info, **kwargs):
def resolve_connection(cls, connection, args, iterable, max_limit=None):
iterable = maybe_queryset(iterable)

if isinstance(iterable, QuerySet):
_len = iterable.count()
else:
_len = len(iterable)

ordering = args.get("ordering")

if ordering:
Expand All @@ -78,7 +73,6 @@ def resolve_connection(cls, connection, args, iterable, max_limit=None):
pageinfo_type=PageInfoExtra,
)
connection.iterable = iterable
connection.length = _len

return connection

Expand Down