T
tRPC

TRPC EXPORT API TYPES BE to FE

TRPC EXPORT API TYPES BE to FE

DDxD10/11/2023
Is there a way I can automatically export my API types from the backend to the frontend? For example, after I modify my backend (e.g., create a new route), do I need to run something like 'trpc-api-export,' and will everything generated in my 'dist' folder be copied and placed in the 'api/api-types' folder on the frontend? Is there an automated way to do this?
Nnlucas10/11/2023
The point of trpc is there’s no codegen, you import the types straight from the BE
DDxD10/11/2023
ok thx i have one more question if is posible @Nick Lucas

Looking for more? Join the community!

T
tRPC

TRPC EXPORT API TYPES BE to FE

Join Server
Recommended Posts
how to access body in middlewareHi, I’m using trpc with nextjs. Does anyone know how to access the request’s body in middleware? As Decreasing autocomplete performanceAnyone else suffering from increased latency (mostly on the front-end) when doing autocomplete with Error while creating a mutation in NextJSI am having the following error: ```"message": "No \"query\"-procedure on path \"checkout.stripe\"",trpc PaginationDoes somebody have any example how can i do pagination in trpc and react query?Auth through trpc proceduresHas Anyone Successfully Implemented Supabase Auth through tRPC Procedures in a Next.js App? Hello esupabase + trpcdid anyone handle to make it work -> context and all signup signin etc methods?How to update query data after mutationAny idea?standaloneMiddleware: Merge ctx/meta/input typesUsing standaloneMiddleware, it would be great to merge the types (ctx, input, meta) with what is alrDoes `fetchRequestHandler()` automatically opt out of /app Route Handler caching?I noticed that Next.js always skips cache for my TRPC API Route Handlers even though the request URLCold Boot OptimizationsI have a next.js app that uses trcp for all of the routes. I am noticing cold boots are slow. It is Cancel useQueries with single functionis there a way to abort useQueries with function call (e.g. cancel, abort)?There is a logger middleware like morgan for express?There is a package with a nice logger middleware? ThanksImplementing wsLink causes issues on ReactI get an error within the console stating ``` Uncaught (in promise) TypeError: Cannot read propertieUnderstanding how too reuse TRPC with React Server ComponentsHopefully I am understanding this correctly, but I have created a `experimental_createTRPCNextAppDirWhat would be considered best practice for getting data and invalidating queries?I have a really simple task management app (doing it to learn stuff). Tasks are grouped in projects Calls to specific table not working in production, fine locallyI am having a strange issue since yesterday. I am using nextjs TRPC and Prisma to connect to a plane