Skip to content
This repository has been archived by the owner. 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

@apollo-cla apollo-cla commented Sep 21, 2019

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

Loading

@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

@mattdell mattdell commented Sep 26, 2019

Have you signed the agreement @mu29 ?

I need this fix 🙂

Loading

@mu29
Copy link
Contributor Author

@mu29 mu29 commented Sep 26, 2019

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

Loading

@mu29 mu29 force-pushed the fix/last-page-pagination branch from e289c52 to 732d430 Sep 30, 2019
Copy link
Member

@hwillson hwillson left a comment

Thanks very much for digging into this @mu29!

Loading

@hwillson hwillson merged commit 551e754 into apollographql:master Oct 2, 2019
6 checks passed
Loading
hwillson added a commit to apollographql/apollo-client that referenced this issue Oct 2, 2019
hwillson added a commit to apollographql/apollo-client that referenced this issue 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants