Pagination Metadata for Join Fields #10142
matthijs166
started this conversation in
Feature Requests & Ideas
Replies: 1 comment 1 reply
-
The main reason for not doing this is that the joins: {
pages: {
count: true
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The new features in 3.0 are amazing!
However, there’s one thing I’d love to see improved or clarified: pagination for join fields.
For example, with two collections: Authors and Books. When I fetch an Author item, I’d like to display their first 10 books with pagination options for the rest. While the API fetch includes the first 10 books and a boolean indicating whether there’s a next page, it lacks the rest of the metadata for correct pagination.
This limitation makes it challenging to implement efficient pagination without resorting to multiple fetches. For example, I currently have to:
Fetch the Author with their initial 10 books.
Perform an additional query to the Books collection using a where clause for the metadata for pagination.
Questions:
Am I missing something in the documentation about how to handle this better?
Is there a way to include pagination metadata for join fields in the query response?
Feature Request:
It would be fantastic if join fields supported full pagination metadata out of the box, similar to how it works for standalone collections. This would significantly improve usability and eliminate the need for multiple on load fetches in scenarios like mine.
Beta Was this translation helpful? Give feedback.
All reactions