/
githubmirror
/
trpc
Обзор
Документация
Войти
/
githubmirror
/
trpc
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
examples/next-big-router/scripts/codegen-base.ts
44 строки
1003 B
Alex / KATT
chore: cleanup big router tests (#5409)
28 янв 2024, 17:16
Не верифицирован
28 янв 2024, 17:16
68c96be
Код
Авторство
О чём код?
import { publicProcedure, router } from '~/server/trpc'; import { z } from 'zod'; export const __ROUTER__NAME__ = router({ greeting: publicProcedure .input( z.object({ who: z.string(), }), ) .query(({ input }) => `hello ${input.who}`), greeting2: publicProcedure .input( z.object({ who: z.string(), }), ) .query(({ input }) => `hello ${input.who}`), greeting3: publicProcedure .input( z.object({ who: z.string(), }), ) .query(({ input }) => `hello ${input.who}`), greeting4: publicProcedure .input( z.object({ who: z.string(), }), ) .query(({ input }) => `hello ${input.who}`), greeting5: publicProcedure .input( z.object({ who: z.string(), }), ) .query(({ input }) => `hello ${input.who}`), childRouter: router({ hello: publicProcedure.query(() => 'there'), doSomething: publicProcedure.mutation(() => 'okay'), }), });