Mads
TTCTheo's Typesafe Cult
•Created by Mads on 3/29/2024 in #questions
Prisma w/pgvector
Hey, we got this t3 app, but Prisma does not support vectors when trying to query the column that's set to vector type (with pgvector database extension enabled). When trying to raw query instead it say's it's not able to serialize.
So therefore I tried to extend the prisma client with the custom query but there is absolutely no intellisense or types following my change, and I believe it must be because I'm not doing it correctly. Below in the comments I've attached the relevant files..
Please tell me if I'm missing a change somewhere.
6 replies
TTCTheo's Typesafe Cult
•Created by Mads on 8/11/2023 in #questions
Debugging the endpoints
Hi, how does one debug the endpoints with breakpoints?
1 replies
TTCTheo's Typesafe Cult
•Created by Mads on 7/15/2023 in #questions
Add rest of User prisma table types and data to nextauth session in auth.ts
Hi, how can I add all the user data to the session including user table specified values and not just nextAuth?
My current setup in the scaffolded T3 auth.ts is the following:
Is this the correct way to add the prisma table colum types and data to the session?
7 replies
TTCTheo's Typesafe Cult
•Created by Mads on 7/14/2023 in #questions
Next-auth error handling on oauth problems
Hi, I have this oAuth custom sign-in page, and I have huge problems with figuring out why I can't access the errors returned from sign-in with a provider...
What is the correct way to do this error handling? Nothing is returned from res or catch err, and the page refreshes 😮
1 replies
TTCTheo's Typesafe Cult
•Created by Mads on 4/7/2023 in #questions
Modify user model in Prisma on signup
Hi amazing people, I'm still learning the stack and I love the type safety!
My question is: I added a new column to the user model called
isSetup
for when the user is new or need to have some required properties filled out.
When the user uses nextauth to authenticate how can I add a default false value to the column on register through one of the providers?
I added all the modules in the stack so it's the full blown t3 generated app.
Feel free to tell me if my question was confusing as I'm not sure how to formulate it 🙂3 replies
TTCTheo's Typesafe Cult
•Created by Mads on 4/6/2023 in #questions
tRPC router refreshes and gives 429 HTTP error
I am implementing a new "endpoint" as from what I have understood. The tRPC looks like the following:
I query this in the frontend like so:
My problem is that I think something with the async function is messing up, it gives me a 429 error meaning I am sending too many requests, and I really don't understand why the data is not being fetched.
5 replies
TTCTheo's Typesafe Cult
•Created by Mads on 4/5/2023 in #questions
What is the convention for customizing sign-in pages in NextAuth
Is there any example of custom pages for NextAuth authentication, something that I can follow the similar setup from as with my generated T3 app?
Bear in my mind I did read the NextAuth documentation - but I am still having trouble with figuring out why the setup as they described won't work, and I think it must have something to do with how the server and client structure is setup.
I followed this example:
https://next-auth.js.org/configuration/pages
12 replies
TTCTheo's Typesafe Cult
•Created by Mads on 4/5/2023 in #questions
How to create new tRPC api route calling external api
Hi I have this app where I want to add a new prompt api route in
server/api/routers/prompt.ts
of the generated T3 app with all modules selected on install.
The code I'm trying to run:
after the code above in the prompt.ts
file created I attach it to the root.ts
of the routers - just like with the example.ts
file and proceed to call it in my client like so:
This gives me a 429 tRPC error when called and I unfortunately have no idea and have been everywhere with the documentation available, any of you friendly developers that have an idea?6 replies