2 ms·
Only supports using Javascript/node servers it seems, so sadly it's not really usable for me. The type exchange seems to rely on shared code between the fronte
by jeroenhd 5y ago
Only supports using Javascript/node servers it seems, so sadly it's not really usable for me.
The type exchange seems to rely on shared code between the frontend and the backend to exchange types, rather than using schemas like other systems.
Not implementing server-side events seems like a shame because they're a very capable mechanism for subscriptions without resorting to websockets.
- sachinraja 5y agoI don't believe there's anything really preventing the use of server-side events. The Websocket implementation is via an adapter and special client so I think the same could be done for SSE (probably achievable in an external package too).
- goodoldneon 5y agoIf you're using OpenAPI, you could use this to generate TypeScript interfaces: https://github.com/bcherny/json-schema-to-typescript https://github.com/bcherny/json-schema-to-typescript It works really well
- chrisarnesen 5y agoTRPC is designed for systems where the front and back ends are both TypeScript. In that case it's simpler to have them share code than to go through an intermediary type system such as GraphQL.