Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

try use batch stream for trpc

Carl-Gerhard Lindesvärdbc54801ad339
diff --git a/apps/dashboard/src/app/providers.tsx b/apps/dashboard/src/app/providers.tsx
index fd223d6a4..1f00362a2 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();