mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-01 11:16:32 +02:00
27 lines
592 B
TypeScript
27 lines
592 B
TypeScript
import * as Sentry from "@sentry/nextjs";
|
|
import { MutationCache } from "@tanstack/react-query";
|
|
import { httpBatchLink } from "@trpc/client";
|
|
import superjson from "superjson";
|
|
|
|
export const trpcConfig = {
|
|
links: [
|
|
httpBatchLink({
|
|
url: "/api/trpc",
|
|
}),
|
|
],
|
|
transformer: superjson,
|
|
queryClientConfig: {
|
|
defaultOptions: {
|
|
queries: {
|
|
retry: false,
|
|
cacheTime: Infinity,
|
|
staleTime: 1000 * 60,
|
|
},
|
|
},
|
|
mutationCache: new MutationCache({
|
|
onError: (error) => {
|
|
Sentry.captureException(error);
|
|
},
|
|
}),
|
|
},
|
|
};
|