vpjm
Explore posts from serversFormData TRPCClientError
Hi i have this error in my client : I am working with Next 15.2.2 and tRPC 11.0.0-rc.682. NO MATTER what I try, FormData cannot be sent to my server — this is very frustrating. If anybody has encountered this problem, please help me!
I have a smaller project with the exact same uploading form, and it works fine there (even with latest next version) . I don’t know how to debug this — I’ve spent hours and haven’t found any major differences between the codebases.
//DATA TRANSFORMER src: https://github.com/juliangra/trpc-next-formdata-app-router
14 replies
Private chat with TRPC
Hi
I'm relatively new to tRPC and I'm currently trying to implement private chat rooms (1:1 conversations or small groups). I’ve checked out the tRPC SSE chat example https://github.com/trpc/examples-next-sse-chat, but it seems to be designed more for public chat rooms.
Could someone please point me in the right direction or share some tips on how to structure private conversations using tRPC ? ( atm, I manually check for each operation whether the user is part of the room, but I don't find this approach very intuitive. )
Thanks a lot in advance!
Maybe it's related to this https://github.com/trpc/trpc/issues/3955, but I'm not sure.
version : v11
3 replies
PPrisma
•Created by vpjm on 2/16/2025 in #help-and-questions
Seeding database with pnpm
I followed this tutorial and I'm using SQLite, but now when I run my Next.js app (
pnpm run dev
), a dev.db
file is created, but it's not seeded.
I assume it's normal for a new database to be created for each app, but how can I make sure it's seeded ?6 replies
TTCTheo's Typesafe Cult
•Created by vpjm on 2/11/2025 in #questions
Passing generic inside tRPC query
Hi, I hope you're doing well.
Server:
Nextjs front:
I would like to pass the type of my Prisma query (
{ include: { image: true } }
) to findManyUser, so users
has the expected type and not the default type provided by Prisma (without generics : DefaultArgs
).
Thanks for your help.
Have a great day/night!8 replies
Passing generic inside tRPC query
Hi, I hope you're doing well.
Server:
Nextjs front:
I would like to pass the type of my Prisma query (
{ include: { image: true } }
) to findManyUser, so users
has the expected type and not the default type provided by Prisma (without generics : DefaultArgs
).
Thanks for your help.
Have a great day/night!6 replies
PPrisma
•Created by vpjm on 1/31/2025 in #help-and-questions
Enum with custom value
Hi, does anyone know if it's possible to do this in Prisma :
Because I can't find a way to specify the enum values like this:
4 replies
PPrisma
•Created by vpjm on 1/30/2025 in #help-and-questions
Generating a default form from Prisma
Hi, for now, I plan to use Prisma's Zod generator and then convert the Zod schema into a form using react-formgen. I’m not sure if there’s a more canonical and reliable way to do this. If anyone has encountered this issue before, feel free to share your insights!
6 replies
PPrisma
•Created by vpjm on 1/3/2025 in #help-and-questions
prisma generate --sql and seeding
Hi,
How can I use raw SQL to seed my database in Prisma?
I would like to use the new SQL feature, but it seems to not work well with nested folders. ( prisma > sql > [version] > seed > [file].sql )
Also, I tried to read the content of SQL files, but I don't know why, when they are read, they aren't syntactically correct anymore to be called in executeRawUnsafe.
10 replies