Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Fix an error that the networkStatus did not change to ready at the end of pagination #3514

Merged
merged 3 commits into from Oct 2, 2019

Conversation

mu29
Copy link
Contributor

@mu29 mu29 commented Sep 21, 2019

Solves #3468

Although #3433 has improved performance by reducing the number of renders in pagination, it only works when the fetchMore function returns a new list.

If we reached to the end of the list, the fetchMore function returns the same length of result, which is determined as equal by the @wryware/equality library we currently use. Therefore, reading the last page of the list remains networkStatus to NetworkStatus.fetchMore.

I think apollo-client needs to send the updated fetchMore result and the changed networkStatus at once.

@apollo-cla
Copy link

@mu29: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

@mu29 mu29 changed the title Fixed an error that the networkStatus did not change to ready at the end of pagination Fix an error that the networkStatus did not change to ready at the end of pagination Sep 21, 2019
@mattdell
Copy link

Have you signed the agreement @mu29 ?

I need this fix 🙂

@mu29
Copy link
Contributor Author

mu29 commented Sep 26, 2019

Sure :) As you can see, all checks have passed.
@hwillson Could you please review this PR?

Copy link
Member

@hwillson hwillson left a comment

Choose a reason for hiding this comment

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

Thanks very much for digging into this @mu29!

@hwillson hwillson merged commit 551e754 into apollographql:master Oct 2, 2019
hwillson added a commit to apollographql/apollo-client that referenced this pull request Oct 2, 2019
hwillson added a commit to apollographql/apollo-client that referenced this pull request Oct 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants