TRPC to connect a client app with a backend apigateway ?
Hi everyone!
Is it a good practice to use TRPC to connect my client application (Next.Js) with my backend RESTful APIGateway app (Nest.Js) that plays a role of an entry point to other micro-services.
Are there best practices for such use cases ?
Would appreciate some examples of recommendations! Thanks!
2 Replies
Trpc is at its best as a replacement to your nestjs API, but it’s also very common to use it as a BFF and sit between the frontend and an existing central backend
@Nick Lucas Thanks! Do you have an example how TRPC can call a service on a backend ? Would create a caller-function be the right choice for this purpose?