Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
node-linker
, I hit those errors:
```...tRPC standalone server in monorepo
Codemod to v10 is not modifying any file
pnpm dlx trpc-v10-migrate-codemod
in my project isn't applying any change. I see all the files listed as "migrated" but nothing is saved on disk?...No overload matches this call when outputting unions

[help] Uncaught (in promise) TRPCClientError: Property description must be an object: u

How can I make tRPC+NextJs APIs faster? (db and functions region is already same)

Superjson "undefined"

Throwing fastify errors when using fastify adapter
fastifyTRPCPlugin
from @trpc/server/adapters/fastify
and trying to throw errors correctly.
I usually use @fastify-sensible
because I find the API clear, e.g. I can write things like fastify.httpErrors.forbidden()
or fastify.httpErrors.unauthorized
.
However if I throw one of these in a tRPC procedure it seems the error code is always 500, assuming that's because tRPC is intercepting/handling them in some way? What's the best way to "solve" this? Thanks!...Confused about createProxySSGHelpers
getServerSideProps
without having ssr: true
what is the difference when you do enable ssr
and forward headers to the server from the client?How to check if data is being prefetched?
How can I access ctx from inside of a procedure?
Async User Call in `createContext` (context.ts) or in `isAuthed` (in trpc.ts)
const { user } = await supabaseAdmin.auth.api.getUserByCookie(opts.req)
const { user } = await supabaseAdmin.auth.api.getUserByCookie(opts.req)

'req' of undefined in onError of express middleware
Mutations and Queries in React Contexts causing unexpected behaviors
In some cases it appears we now have race conditions as loading/success are not necessarily being handled, but in other cases we're not getting reactivity from mutations that are in contexts Anyone else have experience or tips re: throwing tRPC stuff into React Contexts?...
Custom error management
ApplicationError
, which has an errorCode
and a custom data
object with additional information about the error. Any server-side code in the application can throw this error. A middleware catches this and converts it to a 400 Bad Request with an appropriate JSON response body.
In the client, I also have my custom wrapper on top of Axios, that simply catches 400 Bad Request, and converts the JSON back to an ApplicationError
and simply throws it. This means that I can easily catch ApplicationError
in my client side code, just as if it was originally thrown on the client....How can I generate trpc Generic Types?
t
, t.mergeRouters
, t.procedure
, t.router
and t.middleware
.
I've haven't been able to locate those generic types in the @trpc/server
and since trpc has such a complex type structure, would love to see an implementation for a generic set of types for the ones listed about....context question
async middleware
errorFormatter ignored when using appRouter.createCaller