iway1 / trpc-panel

MIT License
663 stars 50 forks source link

Zod Record/Map Input Doesn't Appear #25

Open WilliamWelsh opened 1 year ago

WilliamWelsh commented 1 year ago

z.record() and z.map() don't show up in the panel

Example input

  .input(
    z.object({
      walletAddress: z.string().transform((val) => val.toLowerCase()),
      page: z.number(),
      filters: z.record(z.string(), z.string()),
    })
  )

The filters don't show up. I'm on 1.2.3

iway1 commented 1 year ago

Record and Map are just not supported yet - it's possible to support them though, and is on the roadmap.

You can see a full list of supported zod types at the bottom of the readme - https://github.com/iway1/trpc-panel#supported-zod-types.

Feel free to open a PR if you want to contribute 😊 If not, I'll probably add it myself this weekend or so, adding the rest of the zod types at the top of my priorities for this project.

Even just adding a "input type not supported" error message could be pretty valuable in the interim

WilliamWelsh commented 1 year ago

Alright, thanks. We are loving tRPC.panel() :D