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
cje
cje6mo ago
No description
cje
cje6mo ago
you set it in the queryClient
ali.mcgill
ali.mcgill6mo ago
Brilliant! thank you
shikishikichangchang
What does useErrorBoundary achieve?
ali.mcgill
ali.mcgill4mo ago
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.
Want results from more Discord servers?
Add your server
More Posts