Home / Companies / Gel Data / Blog / Post Details
Content Deep Dive

Designing the ultimate TypeScript query builder

Blog post from Gel Data

Post Details
Company
Date Published
Author
Colin McDonnell
Word Count
2,659
Language
English
Hacker News Points
5
Summary

The text discusses the design and implementation of a TypeScript query builder that can express queries of arbitrary complexity while automatically inferring return types. It is based on EdgeQL, an object-oriented query language designed as a spiritual successor to SQL. The query builder provides the best of both worlds: the type safety of an ORM coupled with the expressive power of a full-fledged query language. Key features include inserting objects, nested inserts, selecting objects, adding computed properties, filters, ordering and pagination, updating objects, self-referential updates, and composing queries. The text also compares the query builder to ORMs and highlights its superior expressive power and functionality.