OkanO
tRPC3y ago
8 replies
Okan

Dynamic return type

Is there any way to have dynamic return type with tRPC?

Simple example:
If I provide x: true on body, let me send number, otherwise string.

But mainly, I want to use it for select fields on database
Solution
Is there any way to have dynamic return type with tRPC?

Simple example:
If I provide x: true on body, let me send number, otherwise string.

But mainly, I want to use it for select fields on database
Was this page helpful?