We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Describe the bug The onServerPrefetch lifecycle hook does not exist anymore in Vue 3
onServerPrefetch
To Reproduce Steps to reproduce the behavior:
useQuery
TypeError: vue_demi_1.onServerPrefetch is not a function
Versions vue: 3 vue-apollo: 4.0.0-alpha.10 apollo-client: 2.6.10
The text was updated successfully, but these errors were encountered:
While some outstanding patch PRs are awaiting fixes and reviews, the following patch should help: #1011 (comment)
Sorry, something went wrong.
Works now
<script setup lang="ts"> import { onServerPrefetch, ref } from 'vue' const todo = ref() onServerPrefetch(async() => { const resp = await fetch('https://jsonplaceholder.typicode.com/todos/1') const data = await resp.json() todo.value = data }) </script>
No branches or pull requests
Describe the bug
The
onServerPrefetch
lifecycle hook does not exist anymore in Vue 3To Reproduce
Steps to reproduce the behavior:
useQuery
TypeError: vue_demi_1.onServerPrefetch is not a function
Versions
vue: 3
vue-apollo: 4.0.0-alpha.10
apollo-client: 2.6.10
The text was updated successfully, but these errors were encountered: