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

Question on cache-and-network policy #76

Closed
geekox86 opened this issue Nov 6, 2020 · 5 comments
Closed

Question on cache-and-network policy #76

geekox86 opened this issue Nov 6, 2020 · 5 comments
Labels
✨ enhancement New feature or request

Comments

@geekox86
Copy link

geekox86 commented Nov 6, 2020

Greetings, thank you for the awesome library. Good job there 👍🏼.

Does cache-and-network update the reactive data returned by useQuery when network fetch is resolved?

@logaretm
Copy link
Owner

logaretm commented Nov 6, 2020

No, it doesn't at the moment. Maybe in the future or I might add a new strategy just for that.

@logaretm logaretm added the ✨ enhancement New feature or request label Nov 6, 2020
@mxrlkn
Copy link

mxrlkn commented Mar 22, 2021

I'd personally like it to update the reactive data.

In https://github.com/FormidableLabs/urql, cache-and-network updates the reactive data.

I can't see why you wouldn't have the new data be available immediately.

@logaretm
Copy link
Owner

I can't see why you wouldn't have the new data be available immediately.

I don't mind having it, PRs are welcome. I just haven't had the time to work on it yet.

@develar
Copy link

develar commented Jul 22, 2021

Current behaviour also not expected for me. https://v4.apollo.vuejs.org/guide-composable/query.html#fetch-policy

return result from cache first (if it exists), then return network result once it's available.

So, will be great if villus will also act like that.

@logaretm
Copy link
Owner

Took long enough to implement this, I've added this in rc.19.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants