Replies: 3 comments 5 replies
-
I can only see your example schema, which four files comprise the adapter? |
Beta Was this translation helpful? Give feedback.
-
@ATLAS2002 Where is the adapter file? |
Beta Was this translation helpful? Give feedback.
-
why identity was getting a null and given error is Unauthorized, even i sign in with clerk successfully? and create entry in database export const create = mutation({ |
Beta Was this translation helpful? Give feedback.
-
Goals
Non-Goals
No response
Background
I have always loved using next-auth for my projects, it gives me enough flexibility to merge different technologies.
In a recent personal project of mine, I wanted to try out Convex. I checked the supabase and prisma adapters and made my own fully functional convex adapter. My implementation might not be most optimized as of now, but it works. And I plan to improve it.
Proposal
So each time a new convex project is created, a
/convex
directory is created in the root.It contains a
schema.ts
file and handler files for each model, such asuser.ts
,account.ts
,session.ts
andverificationToken.ts
.This is the how the
schema.ts
would look like in general:To use the adapter, user has to copy these 4 files into their
/convex
directory. We can further implement a cli tool to have these files auto generated.I was also wondering if I need to follow a naming convention for column names (snake_case / camelCase). The docs were a little confusing as it had both being used together. I would really appreciate some feedback on this.
Beta Was this translation helpful? Give feedback.
All reactions