Added graphql endpoint and tested with tags implementation.

This commit is contained in:
2023-11-20 18:38:10 -08:00
parent 43e4334890
commit f52a76dba3
5 changed files with 461 additions and 37 deletions

View File

@@ -480,6 +480,11 @@ impl Notmuch {
self.run_notmuch(std::iter::empty::<&str>())
}
pub fn tags(&self) -> Result<Vec<String>, NotmuchError> {
let res = self.run_notmuch(["search", "--format=json", "--output=tags", "*"])?;
Ok(serde_json::from_slice(&res)?)
}
pub fn search(
&self,
query: &str,