Using CTEs and Query Rewriting to Solve Versioning
joist-orm.io·3h·
Discuss: r/typescript
🔧Developer tools
Preview
Report Post

Dec 5, 2025

Joist is an ORM primarily developed for Homebound’s GraphQL majestic monolith, and we recently shipped a long-awaited Joist feature, SQL query rewriting via an ORM plugin API, to deliver a key component of our domain model: aggregate level versioning.

We’ll get into the nuanced details below, but “aggregate level versioning” is a fancy name for providing this minor “it’s just a dropdown, right? 😰” feature of a version selector across several major subcomponents of our application:

Version dropdown

Where the user can:

  • “Time travel” back to a previous version of what they’re working on ⌛,
  • Draft new changes (collaboratively with other users) that are not seen until they click “Publis…

Similar Posts

Loading similar posts...