vpjm
FormData 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
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