hagabaka
hagabaka
TtRPC
Created by hagabaka on 4/23/2023 in #❓-help
Procedure with generic input?
4 replies
TtRPC
Created by hagabaka on 4/10/2023 in #❓-help
Typed wrappers for procedures
I have a mini library that used to have only functions that make fetch calls, and now I'm adding an TRPC API. I want to keep the exports consistent so prefer to export functions for the individual procedures instead of a TRPC client. Also I want the client to be lazily created when any of the procedures is used.
15 replies
TtRPC
Created by hagabaka on 4/10/2023 in #❓-help
Typed wrappers for procedures
I'm justing createTRPCProxyClient, not the with react
15 replies
TtRPC
Created by hagabaka on 4/10/2023 in #❓-help
Typed wrappers for procedures
When I try to assign const a: AnyQueryProcedure = client.someQuery, it says it is missing properties _def, _type, and _procedure
15 replies
TtRPC
Created by hagabaka on 4/10/2023 in #❓-help
Typed wrappers for procedures
I don't understand DecorateQuery used in that function. Seems to be this gigantic type defined here https://github.com/trpc/trpc/blob/19c7c27d8ed548b2bc7ab5eb921fd179143aa230/packages/react-query/src/createTRPCReact.tsx#L87
15 replies
TtRPC
Created by hagabaka on 4/10/2023 in #❓-help
Typed wrappers for procedures
Would AnyQueryProcedure include the type of trpc.someQuery?
15 replies