Fork me on GitHub

hey #xtdb users: any thoughts on how to make xtdb's history features and pathom resolvers play nice? coming up with a few ideas... I think the most promising one goes like this: • add ring middleware to look for a query param like ?xtdb-validtime=... (or a cookie? not sure what the best http option here might be) • have the middleware extend the request (and therefore the pathom environment, in most pathom+ring setups) with a {:historical-db (xt/db node xtdb-validtime)} • modify resolvers to prefer :historical-db to :node when it is set would appreciate any thoughts on this approach


I haven't used xtdb, but I imagine if it's similar to datomic having an :as-of parameter at the root of a query might be a neat way to handle that


ostensibly all nodes in a query should use the same db-time, right?


right, all entities for the query would be using the same db-time. that's an interesting idea too!