Use this tag for tRPC, the TypeScript library for defining and using type-safe APIs for use with TypeScript servers and clients. For Remote Procedure Call, use [rpc] instead.
Questions tagged [trpc.io]
124 questions
0
votes
0 answers
security about a db connection in api routes on NextJS
In general, is it safe to setup a DB connection in a api route using NextJS.
My DB credentials is going to be safe?
The data traffic is going to be safe?

gabrielforster
- 31
- 5
0
votes
0 answers
tRPC Mutation Wait For Data Updated
I'm using tRPC, NextJS, and PyShell for my project. I'll send user input to trpc and use that info as input to python script. Wait for python file done and return updated data to trpc, then send back to frontend.
Currently, it takes longer for…

Nhung Luong
- 5
- 4
0
votes
0 answers
Fixing pesky "A spread argument must either have a tuple type or be passed to a rest parameter." error
I have the following Vue 3 useTRPCQuery() composable which lightly wraps tRPC.io's client.query() call, which aims to be type-aware and reactive.
My usage attempt is as follows:
export function useQuery(
client: TRPCClient,
…

Micheal J. Roberts
- 3,735
- 4
- 37
- 76
-1
votes
1 answer
How to type NextJS router.query.id as string?
I'm pretty new to TypeScript, as well as using the T3 stack (React Query / Tanstack Query). I'm trying to type companyId as string, so that I don't have to type companyId as string every time I use it later on it in the code, but I can't figure out…

amota
- 141
- 8