* trpc procedures an middleware refactor * allow use sessionMiddleware without a req object * sync with the new tRPC structure * tRPC refactor on routing form app * import Prisma from @prisma/client * Lazy load apps from appstore * remove unrelated changes * Add types for PaymentService * type fixes * Merge branch 'main' into roae85/cal-1514-set-the-user-session-only-on-the * fix typo * remove console.log * remove explicit types from apstore object * linter fixes --------- Co-authored-by: Keith Williams <keithwillcode@gmail.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
18 lines
565 B
TypeScript
18 lines
565 B
TypeScript
import superjson from "superjson";
|
|
|
|
import { initTRPC } from "@trpc/server";
|
|
|
|
import type { createContextInner } from "./createContext";
|
|
import type { UserFromSession } from "./middlewares/sessionMiddleware";
|
|
|
|
export const tRPCContext = initTRPC.context<typeof createContextInner>().create({
|
|
transformer: superjson,
|
|
});
|
|
|
|
export const router = tRPCContext.router;
|
|
export const mergeRouters = tRPCContext.mergeRouters;
|
|
export const middleware = tRPCContext.middleware;
|
|
export const procedure = tRPCContext.procedure;
|
|
|
|
export type TrpcSessionUser = UserFromSession;
|