Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Could you expand on the nightmare of coupling?

I don't see how declaring an http client server side and consuming it client-side can be a worse thing.

We use the same pattern of creating services that then every consumer can use (a web interface, a cli, etc) and the fact that those things never get to break is a massive improvement over anything I've seen in the past.



If you only ever use Typescript and are sure you’ll never need to interact with the code in any other language or service in a different repo it’s fine. But as soon as you need to reuse that backend for anything else you’re stuck building something new.


You can make calls to tRPC endpoints from anything that can send an HTTP request. The RPC format for requests might not be your cup of tea, but it works.


Ostensibly, the product isn't as useful as the existing gotos (json schemas, shared libraries, graphql, etc), if you cannot create a shareable schema for validation. The ability to form arbitrary requests is already assumed. If your messages are very complex, you need some tooling.


If you’re in TS world then you can export the Zod schema that your tRPC queries/mutations are using.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: