fix: api.custom_query

pull/6277/head^2
Tienson Qin 2022-08-11 20:10:31 +08:00
parent 4b7ab91488
commit 05da02659a
1 changed files with 5 additions and 1 deletions

View File

@ -713,7 +713,11 @@
result (apply d/q query db resolved-inputs)]
(clj->js result)))))
(def ^:export custom_query db/custom-query)
(defn ^:export custom_query
[query-string]
(let [result (let [query (cljs.reader/read-string query-map-or-string)]
(db/custom-query {:query query}))]
(bean/->js (normalize-keyword-for-json (flatten @result)))))
(defn ^:export download_graph_db
[]