I believe I have found multiple issues with window pagination implementation.
AttributeError
is always thrown in ListConnectionWithTotalCount.resolve_connection_from_cache
AttributeError
prevents paginationlast
returns everything and bypasses max_results
ListConnectionWithTotalCount.resolve_connection_from_cache
AttributeError
is always thrown here:
strawberry-django/strawberry_django/relay.py
Line 195 in d6051db
has_next_page = result[-1]._strawberry_row_number < result[-1]._strawberry_total_count if result else False
AttributeError
prevents paginationThis might be intended behavior, but:
In case of AttributeError
pagination falls back to resolve_connection
but (probably due to unavailable overfetch?) pageInfo
's hasNextPage
is wrongly reporting as false
This is probably the biggest issue. Maybe fixable via pk
ordering in case of empty order_by
in apply_window_pagination
?
last
returns everything and bypasses max_results
When last
is used on it's own and execution ends up here:
strawberry-django/strawberry_django/optimizer.py
Lines 561 to 573 in d6051db
slice_metadata.start
is evaluated to 0
slice_metadata.end
becomes sys.maxsize
and queryset ends up filtering out nothing
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too