Michael Rea
Michael Rea10mo ago

queryWithUser on internalAction?

I've been using the convex helpers. I'm trying to use queryWithUser from an Action (thats is called from a mutationWithUser initially. For authentication on mutations and queries on internalActions how should I do it? I'm guessing Auth is not available on internalAction? Should I just not worry about Auth since my Action is spawning from a mutationWithUser anyway? Or should I just use actionWithUser instead?
2 Replies
ballingt
ballingt10mo ago
Internal actions can't be called from outside your code so it's fine to pass in the current user or any other info directly through args.
Michael Rea
Michael ReaOP10mo ago
Okay, cheers. Was trying to prevent duplicate code but I'll just make a function that takes the userId

Did you find this page helpful?