vendor querying step 1.
This commit is contained in:
@@ -85,6 +85,18 @@
|
||||
(map #(trim-usage % (limited-clients (:id args))))
|
||||
#_(map #(assoc % :usage (get usages (:db/id %))))))
|
||||
|
||||
(defn get-graphql-by-id [args id]
|
||||
(->> (cond-> {:query {:find [(list 'pull '?e default-read)]
|
||||
:in ['$ '?e]
|
||||
:where ['[?e :vendor/name]]}
|
||||
:args [(d/db (d/connect uri)) id]})
|
||||
(d/query)
|
||||
(map first)
|
||||
(map #(cleanse (:id args) %))
|
||||
(map <-datomic)
|
||||
(map #(trim-usage % (limited-clients (:id args))))
|
||||
first))
|
||||
|
||||
(defn get-by-id [id]
|
||||
|
||||
(->> (d/q '[:find (pull ?e [*
|
||||
|
||||
Reference in New Issue
Block a user