Expose `inputParser` on `Procedure`?
See original GitHub issueHi - have just started using trpc and it is 👌
One request: what do you think about exposing the (zod) schema on the Procedure
object? The use-case being, I would like to create a UI in an internal admin app using react-json-schema-form for various whitelisted “admin” queries/mutations. If we could access appRouter._def.queries.myQuery.inputParser
we could pass it to zod-to-json-schema which would give us some schemas we could use with react-json-schema-form.
It’s possible to do now by suppressing the typescript error about using a private field, but I wanted to see if you’d be open to making it public so that it wouldn’t disappear and break our workflow in a minor update.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Expose inputParser on Procedure ? #714 - trpc/trpc - GitHub
Hi - have just started using trpc and it is. One request: what do you think about exposing the (zod) schema on the...
Read more >Input parser for functions - MATLAB - MathWorks
The inputParser object enables you to manage inputs to a function by creating an input parser scheme.
Read more >Test procedure - Mini-EUSO software - Read the Docs
Before starting tests run mecontrol -help , this calls InputParser::PrintHelpMsg() function to see all available commands.
Read more >Argparse Tutorial — Python 3.11.1 documentation
The parse_args() method actually returns some data from the options specified, in this case, echo . The variable is some form of 'magic'...
Read more >python - What's the best way to parse command line arguments?
argparse is the way to go. Here is a short summary of how to use it: 1) Initialize import argparse # Instantiate the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mmkal - I’ll leave the PR + docs to you then. Would be really cool get an example of this up and running on retool, such a timesaver.
On phone, will give example tomorrow, but