You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the @zenstackhq/trpc plugin only generates client types for React and Next clients. The types for the Nuxt client trpc-nuxt would be a welcome addition.
It's quite trivial to derive from the Next client and would just require a slightly modified generator template.
Here's the modified version I'm actually using, which is analogous to the Next client:
I ditched the trpc-plugin for good because it's dead slow (generating) and inefficient. The types generated are apparently very complicated and it slows down my IDE noticeably. Felt very heavy with too little benefit. I needed a few endpoints for an admin interface that weren't too much of a hassle to write manually, if your use case is similar you might want to consider that path as well.
Anyway, I hope you get it going. I didn't do anything fancy really, see my plugin definition below. I did have to install @trpc/react-query since the generated code references that. The query and mutation functions have the same signature as the Nuxt trpc client, so they just worked.
Currently the
@zenstackhq/trpc
plugin only generates client types for React and Next clients. The types for the Nuxt clienttrpc-nuxt
would be a welcome addition.It's quite trivial to derive from the Next client and would just require a slightly modified generator template.
Here's the modified version I'm actually using, which is analogous to the Next client:
Would be great if this could make it into the plugin!
The text was updated successfully, but these errors were encountered: