emee
emee2w ago

Better-auth table queries & mutations

It is currently possible to use convex queries & mutation on the better-auth component?
export const findUser = query({
args: {},
handler: async (ctx, args) => {
ctx.query("better-auth-table")
}
})
export const findUser = query({
args: {},
handler: async (ctx, args) => {
ctx.query("better-auth-table")
}
})
5 Replies
Convex Bot
Convex Bot2w ago
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!
Sara
Sara2w ago
No- there are custom functions to do this though without specifically reaching the schema region of the component, if you end up local installing it there's a guide on how to export the generated schema to your app level, then you will be able to do this Your app itself is a component and you won't be able to use it's schema inside one of the components and vice versa
emee
emeeOP2w ago
Ok
Pete
Pete2w ago
@emee I am working around this limitation by copying the user & account data that I need to query to my own users table in the app during creation.
emee
emeeOP2w ago
I probably have a solution by simply using the queries and and mutations exported from "betterAuth/_generated/server". I am using local install.

Did you find this page helpful?