cadams
Explore posts from serversDTDrizzle Team
•Created by cadams on 9/12/2024 in #help
error "Cannot read properties of undefined (reading 'endsWith') at defaultForColumn"
2 replies
TTCTheo's Typesafe Cult
•Created by cadams on 12/12/2023 in #questions
Correct if wrong: Since a tRPC procedure is a hook, they cant be used in the next api/ routes
Hooks can only be used inside components - this makes me think how limiting tRPC is if it can only be used from the front end :/ ?
I have a procedure that my front end uses, now I want the backend (in next api/ route) to use this procedure too and send an email.
I know there are a lot questions around using tRPC procedures outside a project (https://github.com/jlalmes/trpc-openapi i think this solves that dilemma), this is similar that I what to use the procedure, but just from the backend in the same project.
5 replies
TTCTheo's Typesafe Cult
•Created by cadams on 12/9/2023 in #questions
Inserting into DB with prisma in api route
2 replies
TTCTheo's Typesafe Cult
•Created by cadams on 11/3/2023 in #questions
Do you manually create Zod schemas for your Prisma models?
I found myself doing this and thought there should be a better way, cause I have to make the same change in two places. I then googled "prisma zod" saw someone created this, which trys to solve this (I still yet to try it): https://github.com/CarterGrimmeisen/zod-prisma.
I was also wondering if Drizzle possibly has this "one source of type truth" solution built in?
11 replies
TTCTheo's Typesafe Cult
•Created by cadams on 10/8/2023 in #questions
Non-primitive fields not showing on variables of type from RouterOutputs.
13 replies
TTCTheo's Typesafe Cult
•Created by cadams on 9/25/2023 in #questions
When to use "src/page/api/doStuff.ts" vs "src/server/api/routers/routerThatDoesStuff.ts"
11 replies