Something went wrong. Try again.
A self-hosted web platform for applications & services with design based on Google's Material 3 Expressive. (Work In Progress)
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829import { createTRPCClient, httpBatchLink } from "@trpc/client";import type { WorkspacesTRPCRouter } from "@onlineworkspace/workspace-backend/src/systems/trpc/coreRouter.ts";import backend from "./backend";
const trpc = createTRPCClient<WorkspacesTRPCRouter>({ links: [ // splitLink({ // condition: (op: { type: string }) => op.type === "subscription", // true: wsLink({ // client: createWSClient({ // url: "ws://localhost:3564", // connectionParams: async () => { // return {}; // }, // }), // }), // false: httpBatchLink({ url: backend("/api/trpc"), fetch(input, init) { return fetch(input, { credentials: "include", ...init }); }, }), // }), ],});
export default trpc;