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
cje13mo ago
No description
cje
cje13mo ago
you set it in the queryClient
ali.mcgill
ali.mcgillOP13mo ago
Brilliant! thank you
shikishikichangchang
What does useErrorBoundary achieve?
ali.mcgill
ali.mcgillOP11mo 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