where does opts.path and opts.type came from ? i guess by default it only stores ctx ,next and input
Passing objects to the next() function of the middle ware
opts object passed to mutation , i can not understand where it came from
How do I log thrown errors from the query/ mutation on the server side globally?
trpcNext.createNextApiHandler
refers to:
https://trpc.io/docs/server/error-handling#handling-errors
...trpc with app dir nextjs
if I export 'appRouter' instead of 'router' I get error
/src/trpc/
besides the hooks.server.ts
which is inside /src/trpc/
only difference is that inside the file router.ts
I've changed the variable name router
in this line: export const router = t.router({...})
export const router = t.router({...})
React Native/Expo: Uncaught Error: No QueryClient set, use QueryClientProvider to set one
All values in DecoratedProcedureRecord are of type any
createTRPCProxyClient<AppRouter>(...)
call is a DecoratedProcedureRecord
where every value is of type any
.
I'm seeing a lot of issues with TS seemingly struggling to work with this repo, I suspect that the types have become too complex with tRPC and the ORM I'm using. Is it possible that TS has just "given up" so returns any instead of the expected type? Or is it likely something else?...Detecting batch queries/mutations on the server-side
VS Code becomes unresponsive
Middleware-ish for client
Why cannot I specify a mutation input with useQueryKey?

how to connect trpc server (t3 stack) from my external nextjs app?
trpc.legacyRouterName.procedure "does not exist" on type CreateTRPCNextBase, runs anyway
trpc.tasks.getAllTasks.useQuery(...)
, .tasks
will throw the "does not exist on type CreateTRPCNextBase<Router..."
type error, but will run successfully anyway.
The only procedures I can see are my v10 router's greeting
procedure and router methods such as useContext()
....
Not getting legacy router ops in merged tRPC 9 router
trpc.
. I can see trpc.greeting
, though.
Even if I omit the MeasurementRouter.build()
TRPC router, or merge a basic router, the client still doesn't recognize my legacy procedures.
Not sure what to do here, have been hacking on this upgrade for a while and would greatly appreciate a push in the right direction....
createTRPCNext Type Error + useQuery Not Defined
createTRPCNext
from https://github.com/trpc/examples-next-prisma-starter after converting a large legacy router a la the v9 -> v10 migration guide, however I keep getting a large type error on config({ ctx }): is not assignable to type '(info: { ctx?: NextPageContext | undefined; }) => WithTRPCConfig<Router<...
Additionally, querying with old query syntax gets me this error message, and my apppages error out with a 404. The useQuery error: Property 'useQuery' does not exist on type 'CreateTRPCNextBase
In my pages/_app
I am doing export default trpc.withTRPC(MyApp);
, where trpc
is the type error-throwing export const trpc = createTRPCNext
...
Read response headers on the client
Is it possible to access context in input?
input
, Is it possible to get the context
in the input? There are some fields that are required for some users, I would like to handle this in validator level using zod....TRPCContextState not found in v10
import { TRPCContextState } from '@trpc/react-query/dist/declarations/src/internals/context';
and using it in types like trpcUtils: TRPCContextState<AppRouter, any>;
Is there a quick alternative to this? Can't find it in the the latest trpc10 code packages....RateLimiter for fastify tRPC routes