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

feature/offset-pagination #174

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

MedHeikelBouzayene
Copy link

PR Info

This pull request introduces a new pagination feature to Seaography, allowing users to utilize offset-based pagination without adhering to the Relay-style structure of edges and nodes. This feature provides an alternative pagination method that can be simpler and more intuitive for certain use cases.

New Features

  • Offset-Based Pagination: Implements pagination using offset and limit parameters, which are straightforward and commonly used in many applications.
  • Simplified Structure: Removes the requirement for the edges and nodes structure, returning a flat list of items and the total count for more direct data access.
  • Flexible Integration: Easily integrates with existing Seaography setups, providing an option to switch between cursor-based and offset-based pagination as needed.

Changes

  • Added new methods and types to support offset-based pagination.
  • Included tests to ensure the functionality and correctness of the offset-based pagination.

Motivation

While the Relay-style cursor pagination is powerful, it can be overly complex for simpler use cases. This feature aims to provide a more straightforward alternative, making it easier for developers to implement pagination in their applications without dealing with the additional overhead of edges and nodes.

@MedHeikelBouzayene MedHeikelBouzayene marked this pull request as ready for review September 12, 2024 14:39
@MedHeikelBouzayene MedHeikelBouzayene deleted the feature/offset-pagination branch September 12, 2024 18:45
@MedHeikelBouzayene MedHeikelBouzayene changed the title Feature/offset pagination feature/simple-pagination Sep 12, 2024
@MedHeikelBouzayene MedHeikelBouzayene restored the feature/offset-pagination branch September 12, 2024 18:48
@MedHeikelBouzayene MedHeikelBouzayene deleted the feature/offset-pagination branch September 12, 2024 19:13
@MedHeikelBouzayene MedHeikelBouzayene restored the feature/offset-pagination branch September 12, 2024 19:57
@MedHeikelBouzayene MedHeikelBouzayene changed the title feature/simple-pagination feature/offset-pagination Sep 12, 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

Successfully merging this pull request may close these issues.

1 participant