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

Introduce cursor-based pagination #2645

Open
1 of 2 tasks
Venefilyn opened this issue Nov 14, 2024 · 0 comments
Open
1 of 2 tasks

Introduce cursor-based pagination #2645

Venefilyn opened this issue Nov 14, 2024 · 0 comments
Labels
kind/feature New feature or a request for enhancement.

Comments

@Venefilyn
Copy link
Contributor

Description

Subtask of #2567

This would involve displaying the API differently and preferably done as a major version change. Which is something that should ideally be done during the move to FastAPI as mentioned in #2567.

With it you could have a data style such as

{
  "data": [...], // the requested data
  "cursor": "abc123" // pointing to the next data in the pagination
}

Benefit

Cursor-based pagination makes sure we have an efficent pagination while also ensuring that the data will not move, such as with page or offset-based pagination where a new entry would shift the whole set by one, meaning you could see the same data or worse miss something if the new entry is not added in the beginning.

Showing the cursor and data results this way also ensures that it is clear the endpoint is paginated.

Importance

Medium.

What is the impacted category (job)?

General

Workaround

  • There is an existing workaround that can be used until this feature is implemented.

Participation

  • I am willing to submit a pull request for this issue. (Packit team is happy to help!)
@Venefilyn Venefilyn added the kind/feature New feature or a request for enhancement. label Nov 14, 2024
@majamassarini majamassarini moved this from new to priority-backlog in Packit Kanban Board Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or a request for enhancement.
Projects
Status: priority-backlog
Development

No branches or pull requests

1 participant