Open phryneas opened 7 months ago
Was able to confirm in useQueryRefHandlers
tests as well.
I encountered the same bug with the fetchMore
function from useQueryRefHandlers
.
The difficulty in finding it was that the bug doesn't appear when running the development server from Create React App, but it does occur in the production build.
I've just come across the same problem when trying to replace a standard useQuery
with createQueryPreloader
and react-router.
The apollo cache is hit correctly, but the data
never updates after calling fetchMore
and thus your page is out of date. Re-ordering the two hooks seems to work around it.
Issue Description
I encountered this over in https://github.com/apollographql/apollo-client-nextjs/pull/258/:
works, but
fails to rerender the page when the refetch finishes.
Link to Reproduction
https://github.com/apollographql/apollo-client-nextjs/pull/258/commits/3a014a44a9699d6f89296e878d6fa227fa62266e
Reproduction Steps
No response
@apollo/client
version3.9.10