From bc54801ad339d1cc5acfd339e73ab9eb50a8c73b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl-Gerhard=20Lindesva=CC=88rd?= Date: Tue, 7 May 2024 14:39:37 +0200 Subject: [PATCH] try use batch stream for trpc --- apps/dashboard/src/app/providers.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/src/app/providers.tsx b/apps/dashboard/src/app/providers.tsx index fd223d6a..1f00362a 100644 --- a/apps/dashboard/src/app/providers.tsx +++ b/apps/dashboard/src/app/providers.tsx @@ -8,7 +8,7 @@ import makeStore from '@/redux'; import { api } from '@/trpc/client'; import { ClerkProvider, useAuth } from '@clerk/nextjs'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { httpLink } from '@trpc/client'; +import { httpLink, unstable_httpBatchStreamLink } from '@trpc/client'; import { ThemeProvider } from 'next-themes'; import { Provider as ReduxProvider } from 'react-redux'; import { Toaster } from 'sonner'; @@ -34,7 +34,7 @@ function AllProviders({ children }: { children: React.ReactNode }) { api.createClient({ transformer: superjson, links: [ - httpLink({ + unstable_httpBatchStreamLink({ url: `${process.env.NEXT_PUBLIC_API_URL}/trpc`, async headers() { const token = await getToken();