▲ | kentonv 4 days ago | |||||||||||||||||||||||||||||||
I generally agree that the .map() trick doesn't actually replace GraphQL without some sort of server-side optimizations to avoid turning this into N+1 selects. However, if your database is sqlite in a Cloudflare Durable Object, and the RPC protocol is talking directly to it, then N+1 selects are actually just fine. | ||||||||||||||||||||||||||||||||
▲ | ryanrasti 4 days ago | parent | next [-] | |||||||||||||||||||||||||||||||
Agree, and to add, from what I see, the main issue is that server-side data frameworks (e.g., ORMs) aren't generally built for the combination of security & composability that make them naturally synergize with Cap'n Web. Another way to put it: promise pipelining is a killer feature but if your ORM doesn't support pipelining, then you have to build a complex bridge to support them both. I've been working on this issue from the other side. Specifically, a TS ORM that has the level of composability to make promise pipelining a killer feature out of the box. And analagous to Cap'n Web's use of classes, it even models tables as classes with methods that return composable SQL expressions. If curious: https://typegres.com/play/ | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | qcnguy 4 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||
I wonder if there's a way to process the RPC encoding inside a stored procedure, using the various JS-in-DB features out there. |