N
Nuxt11mo ago
plex

Refetching and rerendering AsyncQueries from Apollo?

I'm using AsyncQuery to fetch content before the page is rendered: const { data, refresh } = await useAsyncQuery() <template>{{ data }}</template> Now I thought calling refresh would re-fetch the data and render the new content, but this does not work. I've also tried refreshNuxtData(), but the updated content does not get rendered as well. The only so far I've found to work is to execute the query again with useQuery, but this seems a bit redundant, using two different composables. Is there something I'm missing?
2 Replies
manniL
manniL11mo ago
do you have a reproduction by any chance?
plex
plexOP11mo ago
Okay actually it just seems to be this way. I've found this issue on GitHub with basically the same problem and so far no updates: https://github.com/nuxt-modules/apollo/issues/496
GitHub
useAsyncQuery can't refresh · Issue #496 · nuxt-modules/apollo
Environment I came across different issues opened about what it looks to be the same problem. I have not been able to refresh the data of useAsyncQuery in any way. Describe the bug useAsyncQuery on...
Want results from more Discord servers?
Add your server