It would be so much nicer if the ability to invalidate queries was built into the useMutation hook #8857
Unanswered
kainbryanjones
asked this question in
Ideas
Replies: 2 comments 1 reply
-
I had a similar thought and wondered if the I wouldn't be opposed to introducing a whole new key to the |
Beta Was this translation helpful? Give feedback.
0 replies
-
you can build this in user-land: https://tkdodo.eu/blog/automatic-query-invalidation-after-mutations |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Maybe I don't do this the best way but right now I have to do something like this
It would be so much nicer if there was a way to just invalidate from the mutation hook. Also if there was some way the plugin could generate the types for the queryKeys around the app or there was some centralised way to define such keys.
Beta Was this translation helpful? Give feedback.
All reactions