Skip to content

fix: ssr blocking when skip is true #511

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

Merged
merged 1 commit into from
May 2, 2019
Merged

Conversation

ydfzgyj
Copy link
Contributor

@ydfzgyj ydfzgyj commented Feb 12, 2019

When skip in query option is true or can be computed as true, the start method in SmartApollo won't be triggered, and it leads to serverPrefetch can't get a valid resolve function and block server side rendering.

@dhritzkiv
Copy link
Contributor

This bug in SSR mode has been driving me mad! Took me a while to narrow it down that it was being caused by a query's skip option. Glad to see a fix.

@beeplin
Copy link

beeplin commented Mar 29, 2019

Even with this fix, skip still is not working in SSR. @ydfzgyj can you confirm? ( I am using quasar ssr mode.)

@ydfzgyj
Copy link
Contributor Author

ydfzgyj commented Mar 31, 2019

@beeplin It works fine to me. I think you can try to copy all generated files from my test branch to your project, since we are not sure the vue-apollo.esm.js is the file bundled into your final script.

@beeplin
Copy link

beeplin commented Apr 1, 2019

@ydfzgyj With your test branch it works fine. It turns out that in vue-apollo.esm.js we need to change more than just one place. Thanks!

@Akryum Akryum merged commit d3886b9 into vuejs:master May 2, 2019
@Akryum
Copy link
Member

Akryum commented May 2, 2019

Thanks! 👍

@ydfzgyj ydfzgyj deleted the fix-ssr-skip branch May 5, 2019 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants