starting to gut

This commit is contained in:
2024-11-08 12:18:38 -07:00
parent 351bac3ebf
commit 011c28f0fd
7 changed files with 153 additions and 71 deletions

View File

@@ -1,9 +1,6 @@
import type { CreateNextContextOptions } from '@trpc/server/adapters/next';
export const createContext = async () => {
return {
};
export const createTrpcContext = async () => {
return {};
};
export type Context = typeof createContext;
export type TrpcContext = typeof createTrpcContext;

View File

@@ -1,6 +1,6 @@
import { createContext } from "../context";
import { createTrpcContext } from "../context";
import publicProcedure from "../procedures/public";
import { createCallerFactory, mergeRouters, router } from "../trpc";
import { createCallerFactory, router } from "../trpc";
import { assignmentRouter } from "./assignmentRouter";
export const helloRouter = router({
@@ -11,16 +11,16 @@ export const helloRouter = router({
}),
});
export const appRouter = router({
export const trpcAppRouter = router({
hello: helloRouter,
assignment: assignmentRouter,
});
export const createCaller = createCallerFactory(appRouter);
export const createCaller = createCallerFactory(trpcAppRouter);
export const createAsyncCaller = async () => {
const context = await createContext();
const context = await createTrpcContext();
return createCaller(context);
};
export type AppRouter = typeof appRouter;
export type AppRouter = typeof trpcAppRouter;