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

"Cursor-based pagination" documentation include invalid examples for merge & read #12062

Open
cabillin opened this issue Sep 11, 2024 · 0 comments
Labels
🏓 awaiting-team-response requires input from the apollo team

Comments

@cabillin
Copy link

Issue Description

https://www.apollographql.com/docs/react/pagination/cursor-based/ provides merge & read functions (to optimize the cache during paging while also excluding the paging args via keyArgs) that are invalid.

The functions assume the incoming data is a collection, but it is actually a Connection.
image

Link to Reproduction

https://github.com/cabillin/react-apollo-issues/tree/docs_paging_invalid

Reproduction Steps

npm start on attached repo => observe it is incorrectly showing {"allFilms":[]}

comment out keyArgs, merge, & read => observe the data coming back correctly from the cache

@apollo/client version

3.11.4

@cabillin cabillin changed the title "Cursor-based pagination" documentation "Cursor-based pagination" documentation include invalid examples for merge & read Sep 11, 2024
@bignimbus bignimbus added the 🏓 awaiting-team-response requires input from the apollo team label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏓 awaiting-team-response requires input from the apollo team
Projects
None yet
Development

No branches or pull requests

2 participants