sachinraja / trpc-playground

playground for running tRPC queries in the browser
MIT License
281 stars 19 forks source link

trpc-v10 support #26

Closed MatsDK closed 1 year ago

MatsDK commented 1 year ago

closes #24

This PR adds support for using trpc-v10 routers and gives users the ability to call queries with a proxy-structure.

await trpc.users.byId.query({ userId })

I upgraded all the versions of @trpc/server and @trpc/client to 10.0.0-proxy-alpha.76, is this correct?

MatsDK commented 1 year ago

Currently I am just merging multiple input-parsers, but I don't know if this is the correct way to handle multiple input-parsers in v10. https://github.com/sachinraja/trpc-playground/blob/b7c2037f38eb3d41b456c24db126458eece5f564/packages/trpc-playground/src/zod-resolve-types.ts#L44-L54

sachinraja commented 1 year ago

Thanks for doing this! I invited you as a collaborator on the repository. Merging multiple input parsers is fine!

Will test locally later and merge if all is good.

Edit: planning to review this tomorrow

sachinraja commented 1 year ago

Thanks, this is amazing work!

sachinraja commented 1 year ago

available at 1.0.0-next.0