adds creator.
This commit is contained in:
@@ -24,4 +24,8 @@
|
||||
{:db/ident :report/url
|
||||
:db/doc "Where to download the report"
|
||||
:db/valueType :db.type/string
|
||||
:db/cardinality :db.cardinality/one}]]}})
|
||||
:db/cardinality :db.cardinality/one}]]}
|
||||
::add-creator {:txes [[{:db/ident :report/creator
|
||||
:db/doc "Creator of the report's name"
|
||||
:db/valueType :db.type/string
|
||||
:db/cardinality :db.cardinality/one}]]}})
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
(:sort args) (add-sorter-fields {"client" ['[?e :report/client ?c]
|
||||
'[?c :client/name ?sort-client]]
|
||||
"created" ['[?e :report/created ?sort-created]]
|
||||
"creator" ['[?e :report/creator ?sort-creator]]
|
||||
"name" ['[?e :report/name ?sort-name]
|
||||
]}
|
||||
args)
|
||||
@@ -37,7 +38,7 @@
|
||||
(apply-pagination args))))
|
||||
|
||||
(defn graphql-results [ids db args]
|
||||
(let [results (->> (d/pull-many db '[:db/id :report/client :report/created :report/url :report/name]
|
||||
(let [results (->> (d/pull-many db '[:db/id :report/client :report/created :report/url :report/name :report/creator]
|
||||
ids)
|
||||
(map #(update % :report/created c/from-date))
|
||||
(group-by :db/id))]
|
||||
|
||||
Reference in New Issue
Block a user