Didiel
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Didiel on 11/3/2023 in #questions
Using tRPC without the back-end lock-in. I like it now, but wanna be flexible in the future.
Hey, everyone! My use-case here is that I'm using NextJS for a project that relies on somewhat complex relationships, and am already doing some heavy-lifting, but not to the point where Node doesn't make sense right now, especially given the Need for Speed™. I was thinking graphql, but realistically, it's just very hard to get right, and you need a team of people who eat that stuff for breakfast to make it right, so, of course, REST was the next candidate. Obviously, we know the issues. tRPC is looking good, and I've NEVER tried it before, but it's looking exactly like what I need.
Problem: tRPC definitely does seem lock you into the JS (TS) ecosystem, so, if your back-end becomes .NET, you're screwed. Or...are you? Are there patterns around tRPC that can consume, say, a JSON file to populate its client-side typings?
In essence, I really tRPC, but wanna give myself some leeway in the distant future on the back-end, since I am certain that I'll be changing it.
Thanks 🙂
4 replies