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

Adding total count in non-relay pagination #442

Closed
1 of 3 tasks
stoicsleuth opened this issue Dec 18, 2023 · 2 comments
Closed
1 of 3 tasks

Adding total count in non-relay pagination #442

stoicsleuth opened this issue Dec 18, 2023 · 2 comments

Comments

@stoicsleuth
Copy link

stoicsleuth commented Dec 18, 2023

Feature Request Type

  • Core functionality
  • Alteration (enhancement/optimization) of existing feature(s)
  • New behavior

Description

(Previously mentioned in #408)

Our project very extensively uses strawberry-graphql-django to expose nodes on our models. Earlier, we faced some issues related to pagination since the library only exposed totalCount of paginated results with Relay while we hadn’t built our project on top of Relay.

We had thus overridden some class methods with a previous version of strawberry-graphql-django, which again started breaking when we tried to upgrade to the latest one.
Since overriding methods for pagination is not future-proof, I wanted to propose if we can accommodate 'totalCount' for pagination in the library without going through the Relay route.

I can try creating a PR for it if the idea aligns with the library’s roadmap.
Let me know your thoughts.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@bellini666
Copy link
Member

Hey @stoicsleuth ,

First of all:

Since overriding methods for pagination is not future-proof

We are not planning on breaking API for those in the future. The only reason for such breakeage would be if we had to do something which is incompatible with the current API

But having said that, sure, I think it is fair to have an alternative pagination structure which can expose extra data (such as totalCount) and is not reliant on relay.

PRs are totally welcomed! :)

@bellini666
Copy link
Member

This is mostly a duplicate of #408, so closing it for sanity :)

@bellini666 bellini666 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants