t
tRPC
t
tRPC
How can I use `AnyRouter` in a generic way, but still have _some_ types, instead of all `any`?
Original message was deleted
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,111
Members
View on Discord
N
Nick
•
3/22/23, 4:07 PM
What are you actually trying to achieve
? Ideally you shouldn
’t be playing around with
_def
N
Nick
•
3/22/23, 4:21 PM
Might be worth having a look at tRPC
-playground
, though in general tRPC produces type information and not enumerable data
N
Nick
•
3/22/23, 4:22 PM
The client isn
’t actually aware at runtime of what
’s there
N
Nick
•
3/22/23, 4:22 PM
You might be able to do this in the server codebase
N
Nick
•
3/22/23, 4:23 PM
Yep
, it might be a good use case to detail in a GitHub request as we might be able to provide better reflection down the line
N
Nick
•
3/22/23, 4:23 PM
My lambda just uses a single proxy resource on api gateway
. Works in both v1 and v2 http and rest APIs
N
Nick
•
3/22/23, 4:24 PM
I know there are some cases to emit one resource per though
N
Nick
•
3/22/23, 4:24 PM
Indeed
N
Nick
•
3/22/23, 4:24 PM
You will likely break batching though
N
Nick
•
3/22/23, 4:25 PM
The
“route
” is a bit of a lie
N
Nick
•
3/22/23, 4:26 PM
Yeah you can always disable it
, just loses some benefits of RPC