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
Is there a way to define the Websocket protocol when using wsLink()
The inferred type of this node exceeds the maximum length the compiler will serialize.
The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.
version: latest
related: https://github.com/trpc/trpc/issues/2568 // that din't work for me....Quickstart not working

Use TRPC function inside of a TRPC function
Supabase with trpc
tRPC failed on <no-path>: Invariant: Method expects to have requestAsyncStorage, none available
The message is kind of cryptic, does anyone have an idea what this relates to?...Using tRPC for uploading audio files
Express middleware router type isn't correct
AnyRouter
type isn't compatible.
I've attached some photos of the implementation and the error.
Thanks!...
Enigmatic INTERNAL SERVER ERROR
createProxySSGHelpers type error

Can I force metadata with the createCaller?
Vitest error test