Fetch api.orders.getAll with these arguments a,b,c \r\n\r\n```\r\ncomments: \r\n- I left out the comments as I don't know how to document it right, so here are some comments. \r\n- is use proxies to solve the missing key errors. \r\n- Functions are needed making it possible to be `api.orders` and `api.orders()`. \r\n- _path saves the path like `api.orders.getAll`\r\n- When somewhere a function is called, handlers.apply is called. \r\n- this is *an* implementation not *the* implementation, rather a proof of concept. I use the proxy syntax never, but vue's reactivity system uses it.\r\n\r\n## Final notes\r\nI trying my best to make it easy to grasp, Try the code provided in technical details in your own sandbox to understand a little bit better how it works. Personally, I think this is the easiest syntax as it feels like your calling a function on your backend. I also understand this not Graphql like syntax. Potentially you can have multiple client interfaces. To be honest, I only know this library for a couple of days, because Theo appeared in my youtube feed. So I also don't know if this syntax is in line with the vision of trpc. \r\n\r\nAfter all, I still wanted to show this javascript trickery and proposal, especially after the many hours figuring it out. Do not hesitate to ask further questions if something is unclear. \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n",[2914],{"name":2915,"color":2916},"💡 ideas","bfdadc",2215,"Documentation Proxy Api and @trcp/client","2022-10-04T06:09:12Z","https://github.com/trpc/trpc/issues/2215",0.68810225,{"description":2923,"labels":2924,"number":2931,"owner":2866,"repository":2866,"state":2876,"title":2932,"updated_at":2933,"url":2934,"score":2935},"This is a super weird one. It may have been me who broke it, and I haven't been able to figure out how/why yet. My team's project hits this error trying to update to v9.6.0 (from v9.0.0-alpha.0, which was before #915 went in but after/somewhere in the middle of #718).\r\n\r\nWe're finding that *under certain conditions* `inferProcedureInput\u003C>` is returning `unknown` (in fact, it's the type inference of router definition - the procedure itself is `Procedure\u003CContext, Context, unknown, { ...result... }>`). Repro (note - this does _not_ repro in this repo, if you do `import * as trpc from '../src'` in a test, which is what I tried first. You can use this [playground link](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgUwB5mQYxgFQJ4YDyAZnAL5zFQQhwDkaG2AtDAcnQNwBQokscAFRwAhgGc4MKGEyVqtOgAEpMgPRjkUAG6a6vcNHgIAXhSo16xiABM93TBAB2Y+CLBgAShACuMTXABeSWlMADpqX00ACgBKUJBNAHNkKO44ehFrEGBHVToAGjTgmSL08J8-KFjSuHjfERhgJyi6PxcAWXrGpwLEGvScsF8ALjhjUIgAIwArLBgohH70yggIUfGXKBzE2MLl5bIYvf24KGQxCAAbHVHxPEdZBbhB33IYwIA+OAADABIEF4wULEVZkACE32O6UONXiwGs1kuyAA7iIzlE7g84E9HGh4IdPnBcah5jEjtwYjxuGwMHBOjAGk1nIFJOwIKQ3J4KppQgB9azIYh1BndZw8RhzfBEYgAHiKKjCOWImgACtRMMhrN4zgBJRxDGAy+mMpxiADadEy2VybRgxtFdAAuh9uB9YqEYBAAKIAR28IkuUuQJBlSBBazgm225DdlO4EuwQZD8pCoSVqvVmu1yD1BqNXSZ5stWRyqlt9qZTpdsdCjggQM9ACFkABVRwAazryMcsR4QA) to see it going wrong:\r\n\r\n```ts\r\nimport { expectTypeOf } from 'expect-type';\r\nimport * as trpc from '@trpc/server'\r\nimport {z} from 'zod'\r\n\r\nconst appRouter = trpc.router().merge(\r\n 'admin/',\r\n trpc\r\n .router()\r\n .mutation('testMutation', {\r\n input: z.object({\r\n foo: z.string(),\r\n }),\r\n resolve: async ({ input }) => `${input.foo}!`,\r\n })\r\n .middleware(async ({ next }) => next()),\r\n);\r\n\r\ntype Mutations = typeof appRouter._def.mutations;\r\n\r\nexpectTypeOf\u003C\r\n trpc.inferProcedureInput\u003CMutations['admin/testMutation']>\r\n>().toEqualTypeOf\u003C{ foo: string }>();\r\n\r\nexpectTypeOf\u003C\r\n trpc.inferProcedureInput\u003CMutations['admin/testMutation']>\r\n>().not.toBeUnknown();\r\n```\r\n\r\nThe two `expectTypeOf` tests fail. The second is just to show that the inferred type is `unknown` and that it isn't a typo/bad test setup.\r\n\r\nUpdate: The tests succeed if you remove the `.middleware(async ({ next }) => next())` line (in this case, the middleware is pointless - we are seeing it for a similar middleware that throws under certain circumstances)\r\n\r\nUpdate 2: It can also be repro'd by doing `import * as trpc from '../dist/trpc-server.cjs'` in this repo, which makes things much easier. Could there be some types that are being stripped at build time, maybe?",[2925,2928],{"name":2926,"color":2927},"🐛 bug","d73a4a",{"name":2929,"color":2930},"🧙🏻 typescript wizardry","391441",949,"`inferProcedureInput` broken in published package","2022-10-04T18:08:21Z","https://github.com/trpc/trpc/issues/949",0.69536746,{"description":2937,"labels":2938,"number":33,"owner":2866,"repository":2866,"state":2876,"title":2940,"updated_at":2941,"url":2942,"score":2943},"How it is right now:\r\n\r\n```ts\r\nconst rootRouter = trpc.router().endpoint(\r\n 'hello',\r\n trpc.endpoint((ctx: Context) => (arg1: string, arg2: string) => {\r\n return {\r\n hello: `${data}`,\r\n path: ctx.req.path,\r\n };\r\n }),\r\n);\r\n```\r\n\r\n\r\nSuggestion:\r\n\r\n- 1 single input argument being a named options object\r\n\r\n```ts\r\nconst rootRouter = trpc.router().endpoint(\r\n 'hello',\r\n trpc.resolver((input: { name: string }, ctx) => {\r\n return {\r\n hello: input.name,\r\n };\r\n }),\r\n);\r\n```",[2939],{"name":2896,"color":2897},"Copy endpoint resolver format from GraphQL?","2022-10-05T06:10:55Z","https://github.com/trpc/trpc/issues/10",0.7018058,{"description":2945,"labels":2946,"number":2953,"owner":2866,"repository":2866,"state":2876,"title":2954,"updated_at":2955,"url":2956,"score":2957},"### Describe the feature you'd like to request\r\n\r\nAdd a simpler alternative way to define procedures.\r\n\r\n\r\nThis is the current way of doing it:\r\n\r\n```ts\r\nimport { publicProcedure, router } from './trpc';\r\nimport { z } from 'zod';\r\n \r\nexport const appRouter = router({\r\n hello: publicProcedure\r\n .input(\r\n z\r\n .object({\r\n text: z.string(),\r\n })\r\n .optional(),\r\n )\r\n .query(({ input }) => {\r\n return {\r\n greeting: `hello ${input?.text ?? 'world'}`,\r\n };\r\n }),\r\n});\r\n\r\n```\r\n\r\n### Describe the solution you'd like to see\r\n\r\nMost of the time, I use some sort of base procedure that does all the authz/authn, and end up just doing `.input(x).query(() => { /*...*/} )` etc at the end.\r\n\r\nHere I'm proposing to **adding** an alternative way of defining procedures that I think is a bit more readable:\r\n\r\n```ts\r\nimport { publicProcedure, router } from './trpc';\r\nimport { z } from 'zod';\r\n\r\nexport const appRouter = router({\r\n hello: publicProcedure.query({\r\n input: z\r\n .object({\r\n text: z.string(),\r\n })\r\n .optional(),\r\n resolve({ input }) {\r\n return {\r\n greeting: `hello ${input?.text ?? 'world'}`,\r\n };\r\n },\r\n }),\r\n});\r\n```\r\n\r\n### Desribe alternate solutions\r\n\r\n- There's maybe some alternative way of addressing this\r\n- This is very much a nice-to-have. \r\n- Maybe it can be a bit misleading to have two ways of doing things\r\n\r\n### Additional information\r\n\r\n- Related: #2940\r\n- `input` should not be required\r\n- Needs to work when the base procedures have existing input parsers\r\n- If someone wants to pick this up, I'll happily provide a test suite to work against\r\n\r\n### 👨👧👦 Contributing\r\n\r\n- [X] 🙋♂️ Yes, I'd be down to file a PR implementing this feature!",[2947,2950],{"name":2948,"color":2949},"@trpc/server","9BE78E",{"name":2951,"color":2952},"RFC","78B062",2975,"feat: Add alternative way to create procedures","2022-10-13T13:29:56Z","https://github.com/trpc/trpc/issues/2975",0.702737,{"description":2959,"labels":2960,"number":2965,"owner":2866,"repository":2866,"state":2876,"title":2966,"updated_at":2967,"url":2968,"score":2969},"re @cyrus-za \r\n\r\n> Else people will send inputs, typescript will allow it, and not know why the heck they not getting the input in the resolver\r\n\r\n",[2961,2964],{"name":2962,"color":2963},"👉 good first issue","7057ff",{"name":2948,"color":2949},108,"Respond with 400 if sending input to NoInput procedures","2022-10-05T06:10:49Z","https://github.com/trpc/trpc/issues/108",0.7035871,["Reactive",2971],{},["Set"],["ShallowReactive",2974],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f9qtx3kGEBPUKPjP36a5u25e61Wz8l65vauPv9kWYOHM":-1},"/trpc/v10-playground/20"]