Using setQueryData inside a Mutation/QueryCache
So I am in a situation where the API, often throws MFArequired error, so i felt it is not intuitive to constantly throw a callback (onError) in a useMutation to load a state to open a modal.
So I saw on the docs we can use Mutation/QueryCache to catch the response. So I am wondering if i will run into any issues and if there is a better way to do this.
TLDR:
Can i use
queryClient.ts
So I saw on the docs we can use Mutation/QueryCache to catch the response. So I am wondering if i will run into any issues and if there is a better way to do this.
TLDR:
Can i use
setQueryData inside QueryClient ?queryClient.ts