Difference in type inference for vanilla client?
{json: ..., meta: ...}
, am I doing something wrong?
Zod Error Middleware
zod
for data validation. I was wondering if there's a way to create some kind of "error middleware" that can catch all Zod specific errors and serve the proper TRPC error back to the client.
This would allow us to just use schema.parse
instead of having to manually check schema.safeParse
or having to use try/catch
everywhere.
Thanks for any input! š...clear cookie onError
response
, which would be needed to clear a cookie. Is there a better place to do this, or is there a reason there is no access to the res
?...Mutation with react-hook-form
Request context from getServerSideProps
export async function createContext(opts: trpcNext.CreateNextContextOptions) {
export async function createContext(opts: trpcNext.CreateNextContextOptions) {
Object keeps getting overwritten
b
it resets to an empty object upon a subsequent request. Can anyone help?
```js
addNewTicket: ticketsDomainProcedure
.input(
z.object({...AccessToken for API calls
Request or Response Specification Definition Document
abortOnUnmount config error
zustand + trpc (basic data fetching)
TypeError Cannot destructure property 'abortOnUnmount' of 'useContext(...)' as it is null.
First time learning trpc really good tool. help with setting cookies on front end.
How do we add settings in each query like before?
Handling error globally

cant access trpc endpoints via the browser
tRPC without SSR
getInitialProps
, which has kinda of a cool effect in terms how a page is rendered, since it's rendered server-side on initial requests and client-side on route transitions.
Unfortunately, enabling ssr means that you can no longer use getServerSideProps
(which I know is only fixable by next.js and not tRPC). But how to replicate the getInitialProps
behaviour then?
Let's say I'm building a blog; due to SEO it's basically necessary to render my posts server-side. But when navigating through the site loading posts on the fly would be totally fine. How to do that without ssr
?...trpc + expo react native issue

Can you chain middlewares in v10?
Load data client-side via react-query while using tRPC with SSR