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

RefetchQueries not working for SSR and ssrForceFetchDelay #8701

Closed
Mordred opened this issue Aug 25, 2021 · 4 comments
Closed

RefetchQueries not working for SSR and ssrForceFetchDelay #8701

Mordred opened this issue Aug 25, 2021 · 4 comments
Assignees

Comments

@Mordred
Copy link

Mordred commented Aug 25, 2021

Intended outcome:

When I use mutation with refetchQueries, it should refetch given queries after execute even when page was rendered with SSR.

Actual outcome:

RefetchQueries is ignored for queries executed during SSR when ssrForceFetchDelay is used, because subscriptions for these queries are not started.

How to reproduce the issue:

Here is demo:

https://github.com/Mordred/apollo-client-ssr-bug

When you insert new todo, it should be displayed immediatelly, but AllTodos query is not refetched.

Versions

All versions >3.4.0

@simplecommerce
Copy link

I have the same issue too, it is mentioned here #8644 (comment)

On my end I am using 3.4.2 which works for me, until the issue is fixed in the latest version.

@brainkim brainkim self-assigned this Aug 26, 2021
@brainkim brainkim mentioned this issue Aug 26, 2021
@brainkim brainkim added the 🏓 awaiting-contributor-response requires input from a contributor label Sep 7, 2021
@brainkim
Copy link
Contributor

brainkim commented Sep 7, 2021

This is likely fixed in 3.4.10.

@Mordred
Copy link
Author

Mordred commented Sep 7, 2021

Thanks, I just tested 3.4.10 with the demo and it works. Great job.

@Mordred Mordred closed this as completed Sep 7, 2021
@brainkim brainkim removed the 🏓 awaiting-contributor-response requires input from a contributor label Sep 7, 2021
@brainkim
Copy link
Contributor

brainkim commented Sep 7, 2021

Glad to hear and sorry about the bug!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants