rival-black
rival-black17mo ago

Resource in useCustomMutation successNotification parameter

How do I access or pass a resource name into useCustomMutation? I use this hook to have a reordering feature on my list.tsx page, and when I have the code like on screenshot it gives resource undefined. What should I do to have resource correctly set? (Also, offtopic as a general wish: try to somehow migrate this whole "help" discord to github wiki or any other publicly available platform. Discord is not parsable through search engines, so first you loose developers attention when they try to find a solution, and at the same time you loose SEO points for being mentioned. )
No description
7 Replies
kapa.ai
kapa.ai17mo ago
Sorry @metammodern, I am experiencing especially high traffic right now, please try again. :technologist:
other-emerald
other-emerald17mo ago
useCustomMutation does not know current resource. our docs has wrong example. we will fix this https://refine.dev/docs/api-reference/core/hooks/data/useCustomMutation/#successnotification
rival-black
rival-black17mo ago
@arpentnoir yes, I'm aware of that, that's why I'm asking. How can I tell it the resource name? using useResource?
other-emerald
other-emerald17mo ago
yes you can use useResource
rival-black
rival-black17mo ago
hm, okay. Thank you
other-emerald
other-emerald17mo ago
btw @metammodern your suggestions is great but we need to discus technical details. can you write this on #ideas-and-suggestions channel ? or you can open github issue if you want
rival-black
rival-black17mo ago
Oh, alright, will do:) I will create it in github to also reflect this part of issue(redirecting users) okay look, I did it but when saving github showed me its stupid unicorn and now I'm pissed of. I'll create it later, I wrote a complete article on why this is wrong and now it is all flushed.