fixed warnings.
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
(ns auto-ap.graphql.import-batch
|
||||
(:require [auto-ap.datomic
|
||||
(:require
|
||||
[auto-ap.datomic
|
||||
:refer
|
||||
[add-sorter-fields apply-pagination apply-sort-3 conn merge-query]]
|
||||
[auto-ap.graphql.utils
|
||||
[auto-ap.graphql.utils
|
||||
:refer
|
||||
[<-graphql assert-admin ident->enum-f result->page]]
|
||||
[com.walmartlabs.lacinia.util :refer [attach-resolvers]]
|
||||
[datomic.api :as d]))
|
||||
[clj-time.coerce :as coerce]
|
||||
[com.walmartlabs.lacinia.util :refer [attach-resolvers]]
|
||||
[datomic.api :as d]))
|
||||
|
||||
(def default-read '[:db/id
|
||||
:import-batch/external-id
|
||||
@@ -37,7 +39,7 @@
|
||||
true (apply-sort-3 args)
|
||||
true (apply-pagination args))))
|
||||
|
||||
(defn graphql-results [ids db args]
|
||||
(defn graphql-results [ids db _]
|
||||
(let [results (->> (d/pull-many db default-read ids)
|
||||
(group-by :db/id))]
|
||||
(->> ids
|
||||
@@ -50,14 +52,14 @@
|
||||
[(graphql-results ids-to-retrieve db args)
|
||||
matching-count]))
|
||||
|
||||
(defn get-import-batch-page [context args value]
|
||||
(defn get-import-batch-page [context args _]
|
||||
(let [_ (assert-admin (:id context))
|
||||
args (assoc (:filters args) :id (:id context))
|
||||
[values matching-count] (get-graphql (<-graphql args))]
|
||||
(result->page (->> values
|
||||
(map (ident->enum-f :import-batch/source))
|
||||
(map (ident->enum-f :import-batch/status))
|
||||
(map #(update % :import-batch/date clj-time.coerce/to-date-time)))
|
||||
(map #(update % :import-batch/date coerce/to-date-time)))
|
||||
matching-count :data args)))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user