trpc-sveltekit
trpc-sveltekit copied to clipboard
Query params are all optional client side
trafficstars
Describe the bug Every property of the trpcclient caller router is marked optional.
if i try to call a endpoint, such as
//Server side
myRoute = t.router({ myroute:t.procedure .input( z.object({ a:z.string() b:z.string() }) ) })
//*cliente side trpc().myToute.query()
properties a and b are marked as optional, so .query is actually considering
{a?:string, b?:string}
instead of
{a:string, b:string}
To Reproduce install the basics of the package
Expected behavior property of query params should not be optional if not specified otherwise