How to handle invalidate queries

Hi guys! how do you handle invalidate queries after a successful mutation, what I did is I added a invalidate call to my onSuccess callback in my mutation. This does invalidate my getAllProjects query, however it takes a little bit of time to load. Do you have any suggestions how I might be able to add a loading state while the invalidation happens?
Was this page helpful?