How to get mutationKey in onError?
Hi, in my global ReactQueryClientProvider I try to have global error handling for mutations by setting the MutationCache.
but somehow I do not get any mutationKey from
mutation. Do I have to set mutationKey manually when triggering mutation or is there a default mutationKey?2 Replies
extended-salmon•3y ago
it defaults to
undefinedabsent-sapphireOP•3y ago
Ah alright, thanks! I just saw that our codegen does only create queryKeys for useQuery but no mutationKeys...