diff --git a/src/app/_trpc/Provider.tsx b/src/app/_trpc/Provider.tsx index 94f47df..4f531ff 100644 --- a/src/app/_trpc/Provider.tsx +++ b/src/app/_trpc/Provider.tsx @@ -1,7 +1,7 @@ "use client"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { httpBatchLink } from "@trpc/client"; +import { httpLink } from "@trpc/client"; import React, { useState } from "react"; import superjson from "superjson"; @@ -12,8 +12,8 @@ export default function Provider({ children }: { children: React.ReactNode }) { const [trpcClient] = useState(() => trpc.createClient({ links: [ - httpBatchLink({ - url: "http://localhost:3000/api/trpc", + httpLink({ + url: "/api/trpc", }), ], transformer: superjson, diff --git a/src/app/api/trpc/[trpc]/route.ts b/src/app/api/trpc/[trpc]/route.ts index 5024554..d718e85 100644 --- a/src/app/api/trpc/[trpc]/route.ts +++ b/src/app/api/trpc/[trpc]/route.ts @@ -12,6 +12,9 @@ const handler = (req: Request) => req, router: appRouter, createContext: createTRPCContext, + batching: { + enabled: false, + }, }); export { handler as GET, handler as POST };