Reduce CPU load #3097
Replies: 3 comments
-
We can divide the problem into a little more detail.
For the backend I like input validation on the backend. The type of routing request parameters is generated by schema So currently type inference is For the frontend
You can check my problem on omar-dulaimi/prisma-trpc-generator#61 Although I generated the schema required by the backend. The frontend cannot correctly infer the parameters I need, and I still need to manually modify My idea is to make some tweaks on the type of useQuery . The first generic parameter is the return value type. The second generic parameter is the type of query. That would be easier to use. |
Beta Was this translation helpful? Give feedback.
-
For the backend While checking the router it will show me I'm more concerned with what fields my routes have. What type should the route return for each field. |
Beta Was this translation helpful? Give feedback.
-
My 2 cents Is it possible we do it by directly referencing |
Beta Was this translation helpful? Give feedback.
-
I love TRPC. However I can feel type hints lagging and cpu roaring when apply it in a bigger project. Is there something we can do to reduce the type calculation?
Beta Was this translation helpful? Give feedback.
All reactions