Skip to content

Conversation

@BoD
Copy link
Collaborator

@BoD BoD commented Dec 4, 2025

Ignore incoming pages we don't know how to merge.

Fix for #275

…fter argument. Ignore incoming pages we don't know how to merge.
mergedHasPreviousPage = incomingHasPreviousPage
mergedHasNextPage = incomingHasNextPage
// We can't do anything with that page: ignore it
return existing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we log to the apollo exception handler here to make it easier to catch when this happens?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think it doesn't hurt (except if we want to add a dedicated exception, which would increase the API surface, which I'm not too keen on doing - but just a generic Exception with a good message is probably OK?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds ok, or we can also provide an optional lambda that is called when this happens, so the user can decide. But that also increases the api surface 😬

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the exception in 008f5ee

@BoD BoD merged commit 7cda891 into main Dec 8, 2025
2 checks passed
@BoD BoD deleted the pagination-reset-only-when-first-page branch December 8, 2025 14:16
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.

3 participants