t
tRPC
t
tRPC
Selective return data?
Original message was deleted
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,111
Members
View on Discord
A
Alex / KATT ๐ฑ
โข
11/24/22, 7:23 PM
it is theoretically possible but
extremely
difficult and makes a lot of things more complex
A
Alex / KATT ๐ฑ
โข
11/24/22, 7:24 PM
i don
't think the juice is worth the squeeze
A
Alex / KATT ๐ฑ
โข
11/24/22, 7:24 PM
if you need this type of granularity
, you should use GraphQL that is designed for this
A
Alex / KATT ๐ฑ
โข
11/24/22, 7:24 PM
at some point it
's just tRPC just becomes GraphQL
-in
-TypeScript
A
Alex / KATT ๐ฑ
โข
11/24/22, 7:25 PM
related
:
https://github.com/trpc/trpc/discussions/2150
GitHub
Dynamically type the data result of a hook according to inputs ยท Di...
Hey
, folks
! We ran into a hiccup with trying to dynamically type the data that comes back from our endpoint
. Imagine an identity endpoint that can return either a string or a number
:
/
/ I recognize
.
.
.