apollo-client
apollo-client copied to clipboard
Fix relayStylePagination to better support existing and incoming without edges property
This PR is suggested fix for #7944
The main problem comes from the fact the current implementation assumes that edges (and pageInfo) will always be present in non-null incoming and existing, and forces an empty edges array in cache. This PR debunks this assumption and add some tests of the expected behavior in these cases.
Checklist:
- [x] If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
- [x] Make sure all of the significant new logic is covered by tests
@alexstrat: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/
@benjamn thanks for reading and your questions! Sorry for the late response, I took some time off during the holidays! Please, continue your review, I'll be able to work on it.
@benjamn just a reminder that this PR is still apriori ready for a review - in opposite to the tag 🏓 awaiting-contributor-response seems to specify.
@benjamn , I'm also running into this. What is needed to get this looked at?