apollo-client icon indicating copy to clipboard operation
apollo-client copied to clipboard

Fix relayStylePagination to better support existing and incoming without edges property

Open alexstrat opened this issue 3 years ago • 4 comments
trafficstars

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 avatar Dec 15 '21 03:12 alexstrat

@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/

apollo-cla avatar Dec 15 '21 03:12 apollo-cla

@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.

alexstrat avatar Jan 06 '22 21:01 alexstrat

@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.

alexstrat avatar May 25 '22 12:05 alexstrat

@benjamn , I'm also running into this. What is needed to get this looked at?

anark avatar Mar 01 '24 03:03 anark