Michael Rea
Michael Rea•14mo ago

ActionCtx depreciated?

Tell me if I've got the wrong approach. Should I just be using an internalAction for this? I'm separating out functions that aren't direct mutations, queries or actions into a lib folder. Here I've just got a function that replies in JSON from openAi. I'm passing in "ctx: ActionCtx" because I want to charge a user credits for the usage. This all works fine but I notice that ActionCtx is depreciated? I tried to use GenericActionCtx but it's not working out for me (I'm calling this from an Action)
No description
2 Replies
ballingt
ballingt•14mo ago
Just that particular ActionCtx is deorecated, imported from convex/server. There's another one in convex/_generated/server you should use instead.
Michael Rea
Michael ReaOP•14mo ago
ah okay, easy 😄 . I'm guessing it'll be removed in some future version?

Did you find this page helpful?