Get tRPC procedure latency?
Can't get wsLink's retryDelayMs to work
retryDelayMs
function never seems to be called (I don't see any console messages), and the wsLink keeps trying to reconnect immediately:
```tsx
const TrpcProviderInner: React.FC<{ children: React.ReactNode }> = p => {...createTRPCNext and createTRPCProxyClient within one NextJs app
Calling axios requests not working
Best practices in naming and defining procedures when they don't fit into standard buckets?
items
. They can be queried, mutated and subscribed to. And maybe a few more things - items can be generated, created, pulled from a remote source, deleted, renamed, aliased, etc. But let's try to fit this into these prescribed buckets.
I felt inclined to define items
as a publicProcedure
with all 3 verbs. But I have to choose only one, not all three. The api does not support chaining on multiple verbs. If I want to support all 3, I have to differentiate them as separate procedure definitions such as getItems
, updateItems
, and subscribeToItems
... but then, what's the point of query/mutate/subscribe if I am already differentiating them as separate procedure names? Now the client api surface is weird:
I wanted the client code to read: client.items.query()
, or client.items.mutate(...)
...Separating routers into their own modules and merging them causes "any" type in client
any
types for all procedures in the client. This happens with both mergeRouters
and composing a parent router
with multiple child router
s.
It seems like trpc is loosing type information... I've verified that both my client and server trpc have the same version, 10.23.0
, and that my typescript configuration is correct according to the docs....custom query function
TRPC type checking during build fails
createTRPCNext config ctx always returns undefined.
Standalone Next.js 13.3.2 error
Does tRPC works in application network layer (HTTP) or transport network layer (TCP, UDP)?
returning undefined from server gets stripped on the client

TypeScript, Mono-Repositories and Internal Packages / Project References
@acme/api-service
which exports TRPC types and a Cloudflare Worker, I also have @acme/app
which wants to consume this api service's TRPC types.
In @acme/api-service
I am exporting main / types fields in package.json
, I am also using path aliases, and defining global types for it's environment in compilerOptions.types
in tsconfig.json.
When I don't use project references, and I run tsc --noEmit
for type checking in the @acme/app folder I get errors about the missing global types, and the path aliases. When I use project references it seems like that kind of fixes it, but it looks like I need to continuously watch / build the declaration files of @acme/api-service
while in development to not get these types out of sync....Help to deploy my TRPC proj from a monorepo (turborepo) at Vercel
TRPC ratelimiting endpoints
enforceGuildPermissions
method, which basically checks if the user who is making the request has permission to get the data for that guild.
The data is stored in my Redis cache for 3 seconds. This works okay sometimes, but other times because there is 3-4 different trpc requests running for a single page which are guild, role and channel. It causes the last request (channel) to get rate limited by the discord API because they are all running concurrently, this means it doesn't give my caching code chance to update it before the next one runs....express-session for tRPC
next-prisma-websockets-starter seeds twice on 'pnpm dx'
dx
script from package.json runs both prisma migrate
as well as prisma seed
and the former seems to run the seeder as well, causing data to exist twice in the database after running dx
.
Link to line in package.json: https://github.com/trpc/examples-next-prisma-websockets-starter/blob/db3a7794caa8d024f7115ce1f767d84c0172dd93/package.json#L21...Can you return from an API endpoint before a sync operation is complete?