Show HN: TypeScript query builder with full type inference Hey HN! Colin here - a TypeScripter, open sourcer, and engineer at EdgeDB. As the creator of Zod and tRPC, I'm interested in designing tools/APIs that use type inference and generics to make life easier for devs. This query builder represents another step in that direction. We set out to build an EdgeQL query builder that can express queries of arbitrary complexity (EdgeQL has feature parity with SQL, roughly) and infer the static type of the query result. We introspect the database and generate a schema-aware client that represent any query, including ones that use built-in functions, operators, string/array/tuple indexing, aggregations, conditionals, type casting, subqueries, computed properties, etc—things most ORMs can’t represent. This post mostly discusses the API design, which I think will be interesting regardless of familiarity with EdgeQL. I’d love to see some of these ideas bleed into future generations of TypeScript ORMs/query builders too. Best way to try it is to clone the sandbox repo and follow the instructions in the README[0]. Or jump into the docs[1]. [0] https://ift.tt/9NPMQpV [1] https://ift.tt/5qEyQvH https://ift.tt/Bh3xnye July 26, 2022 at 04:54PM
Show HN: Moderator,lightweight peer4peer anon forum hello all! here's a link to my little pinteresting like forum that stores no data on the server and uses IPFS for image storage. The design aesthetic is that everything would in 64kb of memory so we're going for a collapse-proof low bandwidth experience. this makes moderator really fast. https://moderator.rocks is the web preview, a flutter client is in the works at https://ift.tt/32wqdRb take a look, post something fun, ask questions. I'm also on twitter @moderatorium in case interested. Have fun! January 26, 2022 at 12:23AM
Comments