fjzon
TTCTheo's Typesafe Cult
•Created by fjzon on 4/24/2023 in #questions
How to model my Prisma for a Golf-application
I have this golf application where all Users have their own bags. Inside their bags they have several Golf clubs.
I want to fetch their bags and also list out all the golf clubs inside their respective bags.
How could I achieve this? I guess I can't look inside the bag and see what clubs there is inside there. That instead, I'll have to look at the clubs and see if their Id's is inside a bag. like
But since the bagId is just a string. I can't like map over each bag and use their id against this procedure. Cause in my database, the bagId is null on the discs. And also just a singular string.
5 replies
TTCTheo's Typesafe Cult
•Created by fjzon on 4/14/2023 in #questions
Create a User model in Prisma with Clerk on Signup
One of the benefits I find with NextAuth is that it simplifies a lot by adding a User model to Prisma, so that I have each user in my database right at the start.
I'm having some difficulties in finding some documentation to implement this with Clerk. I guess that I need to create some kind of mutation right when the user signs up. But in that case I would need the data (atleast userId) right when the user creates their account (I am using Discord Provider).
Anyone know of some kind of solution to implement this? Do I perhaps need to create some custom authentication with Clerk?
57 replies
TTCTheo's Typesafe Cult
•Created by fjzon on 4/13/2023 in #questions
Add expo-router to create-t3-turbo-clerk
Since the create-t3-turbo is using the expo-router lib, I thought James version (with Clerk) was too. Got pretty confused when I couldn't see the app-folder.
Well I can see he's working on it since there's a branch literally called expo-router. Now, does anyone now if there's any guide on how to implement expo-router to the current main code?
I know I probably could just read all the changes currently done from James. But I'm too stupid to understand everything and there's a risk something probably would go wrong.
8 replies