Hacker News new | ask | show | jobs
by colinmcd 1583 days ago
I’ve been working on the EdgeQL query builder for TypeScript for around 6 months. This is part of my day job, but the prospect of taking point on this project is what first attracted me to EdgeDB.

The goal is to provide a library that’s autogenerated from your DB schema that can express any EdgeQL query and statically infer the result type.

I’ve done a lot of digging into various SQL query builders for TypeScript, and while some noble efforts have been made, there are structural issues with SQL-notably the fact that it’s tricky to write queries that return nicely structured results-that kneecap those efforts.

By starting with EdgeQL as our target query language, The problem gets more tractable. It still required some truly nextlevel TS wizardry. I’m the developer of Zod and tRPC too, so it’s not my first rodeo, but this is the thing I’m most proud of. Not to sound too grandiose, but this really does represent a “3rd Way“ beyond the usual “raw SQL vs ORM” debate.

[0] https://www.edgedb.com/docs/clients/01_js/expressions