How to add queryClientConfig to createTRPCNext in t-3 App router
Hi everyone,
I am trying to add a default option for tRPC mutations to: "useErrorBoundary: true".
In the t-3 Page router I can extend the config() for "api = createTRPCNext<AppRouter> "
But I can't find the "config()" in the T-3 App router app.
Has anyone else figured this out or is there a better way to set a global default for tRPC mutations/queries in the T-3 App Router app?
Thanks
5 Replies
you set it in the queryClient
Brilliant! thank you
What does useErrorBoundary achieve?
For some reason errors that occur in the react-query part of tRPC where not being caught by the Next.js error boundary. Which meant uncaught errors caused the app to crash.