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

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

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

This comment has been minimized.

Copy link

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/

@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

This comment has been minimized.

Copy link

commented Sep 26, 2019

Have you signed the agreement @mu29 ?

I need this fix 🙂

@mu29

This comment has been minimized.

Copy link
Contributor Author

commented Sep 26, 2019

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

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

left a comment

Thanks very much for digging into this @mu29!

@hwillson hwillson merged commit 551e754 into apollographql:master Oct 2, 2019
6 checks passed
6 checks passed
CLA Author has signed the Meteor CLA.
Details
bundlesize Total bundle size is 7.87KB/7.95KB (-null)
Details
ci/circleci: Bundlesize Your tests passed on CircleCI!
Details
ci/circleci: Tests - CJS Your tests passed on CircleCI!
Details
ci/circleci: Tests - ESM Your tests passed on CircleCI!
Details
ci/circleci: Tests - UMD Your tests passed on CircleCI!
Details
hwillson added a commit to apollographql/apollo-client that referenced this pull request Oct 2, 2019
@hwillson hwillson 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 join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.