Next.js Discord

Discord Forum

Anyone wanna discuss trpc vs traditional API routes?

Unanswered
Pacific sand lance posted this in #help-forum
Open in Discord
Pacific sand lanceOP
Hey guys.

I was wondering how you handle complex api's that call other api's?

Personally I make use of both TRPC and the Traditional API routes.

I try to build everything in a modular fashion and reserve trpc mostly for pulling in data.

Let's say you had an ai pipeline that required calling 5 different api routes in a pipeline, how would you usually handle this with trpc.

I can't imagine having to call trpc routes within other routes and the mess that would cause.

I would just like to know if i'm approaching this the correct way.

It seems to work really well, especially considering the limitations of streaming/batching and not having to force trpc outside of spec.

Is this cool?

0 Replies