mutation is returning void

I made a procedure that returns a string, but when I try to use it on my frontend, it's returning void instead of a string.
20 Replies
'antonyyprints'
'antonyyprints'•2y ago
the images below are the procedure
'antonyyprints'
'antonyyprints'•2y ago
'antonyyprints'
'antonyyprints'•2y ago
Brendonovich
Brendonovich•2y ago
When using mutate, you are expected to use the onSuccess and onError callbacks you can provide as a second argument. It won't wait for you to finish. The behaviour you want can be done with mutateAsync, which you'll have to await.
'antonyyprints'
'antonyyprints'•2y ago
anychance this is the same as you are talking about?
'antonyyprints'
'antonyyprints'•2y ago
I know this is for optimistic ui updates, but can I add onSuccess to that?
Brendonovich
Brendonovich•2y ago
Yeah that's it
'antonyyprints'
'antonyyprints'•2y ago
it still does the same thing when I do this
Brendonovich
Brendonovich•2y ago
You can do it either in useMutation or when you call mutate
'antonyyprints'
'antonyyprints'•2y ago
I still get the same issue even when I use this 😦
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Brendonovich
Brendonovich•2y ago
Show how you're using onSuccess
'antonyyprints'
'antonyyprints'•2y ago
sorry I'm a little novice to this working on adding this right now
'antonyyprints'
'antonyyprints'•2y ago
'antonyyprints'
'antonyyprints'•2y ago
my brain is not working anymore lmfao
Want results from more Discord servers?
Add your server