arashi-dev
swagger to trpc-like interface generator?
I have a backend which exposes a fully detailed swagger json file. And I want to have an auto generated api client with an interface like trpc.
I managed to do it using
swagger-typescript-api
and custom templates, but wondered if anyone did it already or if there is any open source project that does almost the same thing, so I can get better ideas for implementation.
Thanks4 replies
Rate limit in TRPC and NextJS?
Hello,
I am using TRPC with nextjs without express adapter.
I am wondered what is the best and free solution to rate limit some of the procedures?
I found the lru-cache approach for nextjs but thought if there is a better way...
6 replies
dynamic query and mutation
Hello. I have an
edit form
component like this:
this code is going to be repeated for different models (Product, User, Color, Category, etc.). so, I am looking for a way to make it DRY and reusable.
the only difference between them is the model name in trpc trpc.admin.THE_MODEL_NAME
and the validation schema. the rest are just same and repeated
how can I make it reusable? I thought maybe I can create a Component for it and pass fetchData
, updateData
props to handle the query and mutations. but they are harder to manage as I can't track the status and abort on unmount3 replies