Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infer and display expected result type from procedure #20

Open
aidansunbury opened this issue Nov 9, 2024 · 1 comment
Open

Infer and display expected result type from procedure #20

aidansunbury opened this issue Nov 9, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@aidansunbury
Copy link
Owner

Is your feature request related to a problem? Please describe.
It is impossible to know the expected return type of a procedure from trpc-ui before it is run. Addressing this would be a nice quality of life fix.

Describe the solution you'd like
Swagger displays expected output values. These typically have to be defined in the spec, however the whole point of tRPC is type inference. It should be possible to at least display the return type of a procedure.

Screenshot 2024-11-08 at 9 08 11 PM

@aidansunbury aidansunbury added the enhancement New feature or request label Nov 9, 2024
@aidansunbury
Copy link
Owner Author

This will only be possible if the procedure is using output validators, but could still be useful when output validators are defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant