adverse-sapphire
adverse-sapphire15mo 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.ai15mo ago
Sorry @metammodern, I am experiencing especially high traffic right now, please try again. :technologist:
extended-salmon
extended-salmon15mo 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
adverse-sapphire
adverse-sapphire15mo ago
@arpentnoir yes, I'm aware of that, that's why I'm asking. How can I tell it the resource name? using useResource?
extended-salmon
extended-salmon15mo ago
yes you can use useResource
adverse-sapphire
adverse-sapphire15mo ago
hm, okay. Thank you
extended-salmon
extended-salmon15mo 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
adverse-sapphire
adverse-sapphire15mo 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.