Beginner Client Problems
.omit()
call to remove fields not allowed to be set by my user. I'm using this in a publicProcedure as the argument to .input(TableValidator)
, and there's a .mutation()
that inserts the data into the database.
I have also used a z.infer<typeof TableValidator>
to get a type for this data, which I'm using on the client to coerce the single data structure I'm using as test data to that type, to use as an argument to the .useMutation()
call....How to deal with breaking backend version releases during active session?
useMutation() runs 3 times
How to protect against Cross Site Request Forgery (CSRF)
tRPC doesn't explicitly check Content-Type
Create a typescript type that refers to a useQuery hook dynamically
type CommonHookFn = (name:string)=>MyCustomType
, except I need the equivalent of a useQuery hook where I can templatize the inputs/outputs).
From exploring the types under the hood of trpc, I think I need to use ProcedureUseQuery<TProcedure, TPath>
to do this, but I can't figure out what I would put in to TProcesure/TPath to tell it that I'm looking for a Query with specific input/output types.. (e.g need a hook that takes a string
as n input, and returns MyCustomType
for its data)
Does anyone know how to create a type like this?...tRPC Options Method not Allow in Vercel Next.js

Best way to update a TRPC useQuery response without refetching
What is a useSuspenseQuery?
No "mutation"-procedure on path
How to access the query cache data?
Thoughts on how to integrate t3 app, connectkit web3 auth, nextjs middleware, and trpc
onError callback type
Can I perform react query queries without using a trpc procedure, using useQuery standalone
Test React component using trpc client and `useSuspenseQuery`
useSuspenseQuery
.
I'm using Jest and I'm mocking the tPRC server with Mockttp.
...How to extract mutation type
Mock form data middleware (
Ability to mutate/extend `input` from middlewares
''
(empty string) to undefined
for the whole input
object.
Here is my setup:
```js...Hot to redirect in middleware when using createCallerFactory