Migrates back to datomic on-prem
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
(ns auto-ap.graphql.import-batch
|
||||
(:require
|
||||
[auto-ap.datomic :refer [add-sorter-fields apply-pagination apply-sort-3 conn merge-query pull-many-by-id]]
|
||||
[auto-ap.datomic
|
||||
:refer [add-sorter-fields
|
||||
apply-pagination
|
||||
apply-sort-3
|
||||
conn
|
||||
merge-query
|
||||
pull-many-by-id
|
||||
query2]]
|
||||
[auto-ap.graphql.utils
|
||||
:refer
|
||||
[<-graphql assert-admin ident->enum-f result->page attach-tracing-resolvers]]
|
||||
:refer [<-graphql
|
||||
assert-admin
|
||||
attach-tracing-resolvers
|
||||
ident->enum-f
|
||||
result->page]]
|
||||
[clj-time.coerce :as coerce]
|
||||
[com.walmartlabs.lacinia.util :refer [attach-resolvers]]
|
||||
[datomic.client.api :as dc]))
|
||||
[datomic.api :as dc]))
|
||||
|
||||
(def default-read '[:db/id
|
||||
:import-batch/external-id
|
||||
@@ -32,8 +41,7 @@
|
||||
:where ['[?e :import-batch/date]]}}))]
|
||||
|
||||
|
||||
(cond->> query
|
||||
true (dc/q)
|
||||
(cond->> (query2 query)
|
||||
true (apply-sort-3 args)
|
||||
true (apply-pagination args))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user