Is there any example of implementation of external API usage?

Hello everyone, i want to use t3-app stack that consumes my external API which is written spring-boot with java. Could you give me an example repo or something with t3 stack? thank you
3 Replies
Keef
Keef12mo ago
I don’t have any links but this is very doable through something as simple as http or you can pull in Graphql depending on your wants and needs. Only thing you really have to work around is making sure your typings are in sync if you are running it in production. If it’s a hobby thing just write the types yourself in zod and just validate the returns if you go the http route. Graphql gives you the typings already which is nice and it’s a great way to connect different language systems For http codegen you can do something like openapi generation for your java api
Benja
Benja12mo ago
GitHub
GitHub - jlalmes/trpc-openapi: OpenAPI support for tRPC 🧩
OpenAPI support for tRPC 🧩. Contribute to jlalmes/trpc-openapi development by creating an account on GitHub.
Endgame1013
Endgame101312mo ago
It totally depends on what kind of external API is written spring boot. If it’s a REST or GraphQL API, a there are plenty of examples online. I personally like tanstack-query (formerly react-query): https://tanstack.com/query/latest/docs/react/overview
Overview | TanStack Query Docs
TanStack Query (FKA React Query) is often described as the missing data-fetching library for web applications, but in more technical terms, it makes fetching, caching, synchronizing and updating server state in your web applications a breeze. Motivation
Want results from more Discord servers?
Add your server