You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then in my pinia store I can do something like this
exportconstuseAssetsStore=defineStore("assets",()=>{/** * Used in the Search Bar to know what to search for */constsearchString=ref("");/** * Watch the searchString ref and when it changes call a refetch */watch(searchString,()=>{refetchQueriesByTags([QueryTags.ASSETS_DATA]);});
...
Then in a component I can bind searchString to a v-model and it will cause my queries to refetch whenever this is changed.
The part I'm concerned about is I seem to just be hacking the fact that useMutations allows an empty query object.
Is there a better way to do this?
Am I using an anti-pattern?
The text was updated successfully, but these errors were encountered:
I love villus! We've been using it an application we're writing for digital asset management (not crypto, 3d assets).
My problem is I have actions happening in my application which are not graphql mutations but still should cause queries to refetch.
This is the pattern I'm using currently and I wanted to just get a gut check to see if this is wild and dumb or if there is a built in way to do this.
Then in my pinia store I can do something like this
Then in a component I can bind searchString to a v-model and it will cause my queries to refetch whenever this is changed.
The part I'm concerned about is I seem to just be hacking the fact that useMutations allows an empty query object.
Is there a better way to do this?
Am I using an anti-pattern?
The text was updated successfully, but these errors were encountered: