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

Using prefetch or enabled in SSR leads to endless loading #940

Open
negezor opened this issue Mar 20, 2020 · 5 comments
Open

Using prefetch or enabled in SSR leads to endless loading #940

negezor opened this issue Mar 20, 2020 · 5 comments

Comments

@negezor
Copy link

negezor commented Mar 20, 2020

Describe the bug
Using the prefetch or enabled options in useQuery on the server causes endless loading.

To Reproduce
Steps to reproduce the behavior:

  1. Use SSR
  2. Add option prefetch or enabled
  3. Watch endless loading

Expected behavior
Disabling the request before the client waits for the necessary data.

Versions
vue: 2.6.11
vue-apollo: 3.0.3
apollo-client: 2.6.8
@vue/composition-api: 0.5.0
@vue/apollo-composable: 4.0.0-alpha.7

Additional context
The problem is related to not resolved promise in onServerPrefetch.

@negezor
Copy link
Author

negezor commented Jun 25, 2020

Related #1001

@beeplin
Copy link

beeplin commented Jun 25, 2020

This is not necessarily related to #1001. 0.5.0 also freezes in SSR if the initial value of enabled is false. I guess that on the server side the ref values are not reactive at all, so all enabled values are fixed to their initial values, and if the values are false, the whoel queries are frozen. Likewise, all computeds only have initial values effective, and all lazy watchs never work.

@brunomperes
Copy link

Also happening on

Versions
vue: 2.6.12
vue-apollo: not installed
apollo-client: 3.1.2
@vue/composition-api: 1.0.0-beta.11
@vue/apollo-composable: 4.0.0-alpha.10

Have you found any workaround?

javiertury added a commit to javiertury/vue-apollo that referenced this issue Oct 4, 2020
javiertury added a commit to javiertury/vue-apollo that referenced this issue Oct 4, 2020
javiertury added a commit to javiertury/vue-apollo that referenced this issue Oct 4, 2020
javiertury added a commit to javiertury/vue-apollo that referenced this issue Oct 4, 2020
@seanaye
Copy link

seanaye commented Oct 19, 2020

Any updates on this?

@javiertury
Copy link
Contributor

@seanaye It should be solved in version v4.0.0-alpha.12, which was released 2 days ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants