import { publicProcedure, router } from '~/server/trpc/init'; import { z } from 'zod'; export const appRouter = router({ hello: publicProcedure.input( z.object({ text: z.string(), }), ).query((opts) => { return { greeting: `hello ${opts.input.text}`, }; }), }); // export type definition of API export type AppRouter = typeof appRouter;