Add server and client build versions

This commit is contained in:
2024-09-01 14:55:51 -07:00
parent fdaff70231
commit 1f393f1c7f
17 changed files with 342 additions and 13 deletions

View File

@@ -229,6 +229,10 @@ struct SearchCursor {
pub struct QueryRoot;
#[Object]
impl QueryRoot {
async fn version<'ctx>(&self, _ctx: &Context<'ctx>) -> Result<String, Error> {
build_info::build_info!(fn bi);
Ok(shared::build_version(bi))
}
async fn count<'ctx>(&self, ctx: &Context<'ctx>, query: String) -> Result<usize, Error> {
let nm = ctx.data_unchecked::<Notmuch>();
let pool = ctx.data_unchecked::<PgPool>();