- To implement pagination with Apollo, you're typically going to use the
fetchMore
function, given to you when you send a query, in combination withupdateQuery
to tell Apollo how to update its cache with the result (appending it onto what you already have). - To implement near real-time syncs, you're typically going to use polling, which will resend your initial query every x seconds.
So polling refetches your initial query and will overwrite the cache, so you lose pagination and all the fetchMore
stuff you added to the cache via updateQuery
.
My question : How can one do polling and pagination at the same time while keeping a great user experience ? (without subscriptions)