Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

queryCache.invalidateQueries() does not refetch ? #134

Closed
liorchamla opened this issue Dec 16, 2024 · 0 comments
Closed

queryCache.invalidateQueries() does not refetch ? #134

liorchamla opened this issue Dec 16, 2024 · 0 comments

Comments

@liorchamla
Copy link

First : I'm sorry I can't give you all a reproduction environment. My question is very simple :

  1. I have a list of users which queries users with pagination, so the key is like that : () => ["users", route.params.page] ;
  2. I have a view for a single user, and inside, I have a mutation for editing or deleting the user ;
  3. After editing or deleting the user, I want to invalidate queryCache in order to make pinia colada refetch the list, so when I go back to the list, it will refetch users, so after mutations are done, I do : queryCache.invalidateQueries({ key: ["users"] })

Expected behavior
When I go back to the list, I expect my list to refetch because the cache is no longer valid

Real behavior
The list still shows me the old data and does not refetch what so ever

Is there something I'm missing ?

@github-project-automation github-project-automation bot moved this to 🆕 Triaging in Pinia Colada Roadmap Dec 16, 2024
Repository owner locked and limited conversation to collaborators Dec 16, 2024
@posva posva converted this issue into discussion #135 Dec 16, 2024
@github-project-automation github-project-automation bot moved this from 🆕 Triaging to Done in Pinia Colada Roadmap Dec 16, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant