Complex type inference on router outputs?
Where to put clean up code?
createContext
that I must explicitly close per-request.
But I cannot find any good spots in the TRPC lifecycle to make that call.
I tried just running it in a middleware, but seemingly that is invoked on each query in a batch independently, whereas I need it to be called once all queries have finished.
FWIW: I am using create-t3-app with @vercel/postgres and createClient
.
...Trigger lambda configured with trpc using other events
useInfiniteQuery does not exist on appRouter t3-Stack Prisma
Property 'useInfiniteQuery' does not exist on type '{ query: Resolver<BuildProcedure<"query", { _config: RootConfig<{ ctx: { headers: Headers; db: PrismaClient<{ log: ("query" | "warn" | "error")[]; }, never, DefaultArgs>; session: Session | null; }; meta: object; errorShape: { ...; }; transformer: typeof SuperJSON; }>; ... 5 more ...; _output_out: unique symbol; }
and I can't find anything about it.
...Datadog traces
Asynchronous subscribe and unsubscribe methods in observable
trpc v11 error: The transformer property has moved to httpLink/httpBatchLink/wsLink
Typescript optimisation
Is it possible to change how TRPC maps routers to URL paths?
/auth.signup
or /project.create
.
This is perfectly fine until I merge two routers that each merge more routers. Then it becomes e.g. /auth.signup.verify
. As I am building an API that should be usable by external users (not only my own frontend), I would prefer it to be /auth/signup.verify
to prevent confusion. Is there an option to achieve this result?...Create user on the function mutate, with TRPC and Payload
How to not prefetch on getServerSideProps if it's already fetched?
getServerSideProps
that utilizes createServerSideHelpers
, and when I access a page I prefetch ~10 queries. But this is extremely slow, is there a way to only prefetch once, and if it's in cache don't prefetch?Return undefined if param is not there
useQuery caching data
Error using createTRPCQueryUtils
Why do we pass the database client in the context
Subscriptions between different services
Serving files with TRPC and Express
...
TRPC useQuery() in NextJS full stack with TypeScript
Not getting "User" type on context.
const ownerProcedure = t.procedure.use(async(opts) => await securityHandler.authenticateOwner(opts));
const ownerProcedure = t.procedure.use(async(opts) => await securityHandler.authenticateOwner(opts));
Type error when creating a server-side context ๐ค