fjzon
fjzon
TTCTheo's Typesafe Cult
Created by fjzon on 4/24/2023 in #questions
How to model my Prisma for a Golf-application
Oh shit! Didn't even know you could query relations. Thought you had to do some reverse stuff to get the respective model. Thanks... 😅
5 replies
TTCTheo's Typesafe Cult
Created by NekoChan on 4/16/2023 in #questions
Is it a correct way to get Clerk user data ...?
if I would install the @clerk/nextjs/server library. Would I still be able to create a procedure with this and use it inside my expo application (create-t3-turbo)?
36 replies
TTCTheo's Typesafe Cult
Created by fjzon on 4/14/2023 in #questions
Create a User model in Prisma with Clerk on Signup
@Albatros So from what I understand of what James said. Both the NextJS and Expo apps are connected to the same Clerk API (or whatever you should say). Basically that means that whenever an event is fired from NextJS or Expo that has something to do with Clerk, it affects the same data. So what you can do is that you should be able to put a file called webhook.ts/js in the NextJS api folder, since that's the only api endpoint that acts on the server. E.g. your-application/apps/nextjs/src/pages/api/webhook.ts/js Remember that when you use this Webhooks locally, you need something like localTunnel or Ngrok to make it work. I watched this video yesterday: https://www.youtube.com/watch?v=rAv4ZLGM22Q&ab_channel=JamesPerkins
57 replies
TTCTheo's Typesafe Cult
Created by fjzon on 4/14/2023 in #questions
Create a User model in Prisma with Clerk on Signup
Alright cool! Ye the fetch all users was just some random example. It's more like you wrote that each user invites their friends. And yes, if I atleast am able to store the user_id in the database for each user, i'm satisfied! Im not quite familiar with Webhooks. But I guess I could find some documentation in how I would implement the code you provided. Thank you for that! I find Clerk really cool by the way, so there's no like "offense" saying what NextAuth provides. It's just what I'm used to and learned to know.
57 replies
TTCTheo's Typesafe Cult
Created by fjzon on 4/14/2023 in #questions
Create a User model in Prisma with Clerk on Signup
Sorry for my lack of knowledge. I've managed to handle like "the current sessioned user". But I am currently building a golf application. So when the user creates a new Round, she/he should be able to add other users to play with. I am completely with you that it's enough with the user_id. But I think that each user should live somewhere in my database, to handle relations between the users. Therefor I thought that I would need to search for all the other users from the database whenever I create a new round (like api.users.getAll.useQuery()).
57 replies
TTCTheo's Typesafe Cult
Created by fjzon on 4/13/2023 in #questions
Add expo-router to create-t3-turbo-clerk
Alright, thanks!
8 replies