Closed tombryden closed 7 months ago
Thanks for the report!
Can you please check if this also occurs with the useSuspenseQuery
from @apollo/client
, so that we can pinpoint which of the two libraries we have to debug here? :)
I just retested using a toggle show button to avoid hydration issues with useSuspenseQuery
from @apollo/client
.
Refetchqueries works as expected in this case.
Arrr, I just retested the same scenario (toggle button) using the import from @apollo/experimental-nextjs-app-support/ssr
and this refetches the first time successfully.
It looks like the issue only occurs when loading via SSR.
You are on 0.4.2? We had a bug that didn't "finish" simulated network requests in older versions that might surface like this.
Yes, I am on 0.4.2.
I'll try to look into that next week. If you could provide me with a minimal reproduction, I would be very grateful!
Thanks! Here you go: https://github.com/tombryden/experimental-apollo-suspense-bug
Sandbox: https://codesandbox.io/p/github/tombryden/experimental-apollo-suspense-bug/
npm run dev
Click mutate button
Could you please verify if this build from #96 solves your problem?
npm i @apollo/experimental-nextjs-app-support@0.0.0-commit-6211d17
This should be fixed with https://github.com/apollographql/apollo-client-nextjs/releases/tag/v.0.4.3
Apologies for the delay! Can confirm this is now working as expected. Many thanks.
Hello,
I have noticed that useSuspenseQuery is not refetching on the first call after a mutation calls it in refetchQueries.
Here is a gif of what occurs with added delay from the api
When changing to useQuery, all works as expected.
Page
TodoList
AddTodo
Thanks