How can I get return value from "use node" action inside mutation ?
How can I get return value from "use node" action inside mutation ?
- I try this
ctx.runAction
but got error "runAction does not exist",
- So I move to ctx.scheduler
but can not get response from that
// hashActions.ts
// userAuths.tsx
Thank you3 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
“use node” isn’t actually important here - you can’t use runAction from a mutation, only from another action.
You could use an action to hash the password and then use runMutation to insert the email and hashed password to the database. You could also start with a mutation that inserts the email and leaves the hashed password blank, and then schedule the node action to hash the password and runMutation to insert it. That may or may not be worth the effort depending on how you’re handling client state during creation.
I see, thank you for your info. I will hash then pass to mutation