minor reorg.
This commit is contained in:
@@ -386,26 +386,10 @@
|
||||
node))
|
||||
m))
|
||||
|
||||
(defn get-invoice-page [context args value]
|
||||
(let [args (assoc args :id (:id context))
|
||||
|
||||
invoices (map
|
||||
->graphql
|
||||
(d-invoices/get-graphql (<-graphql (assoc args :id (:id context)))))
|
||||
invoice-count (d-invoices/count-graphql (<-graphql args))]
|
||||
[{:invoices invoices
|
||||
:total invoice-count
|
||||
:count (count invoices)
|
||||
:start (:start args 0)
|
||||
:end (+ (:start args 0) (count invoices))}]))
|
||||
|
||||
|
||||
(defn get-all-invoices [context args value]
|
||||
(assert-admin (:id context))
|
||||
(map
|
||||
->graphql
|
||||
(d-invoices/get-graphql (assoc (<-graphql args)
|
||||
:limit Integer/MAX_VALUE))))
|
||||
|
||||
|
||||
|
||||
(defn get-all-payments [context args value]
|
||||
(assert-admin (:id context))
|
||||
@@ -459,8 +443,8 @@
|
||||
|
||||
(def schema
|
||||
(-> integreat-schema
|
||||
(attach-resolvers {:get-invoice-page get-invoice-page
|
||||
:get-all-invoices get-all-invoices
|
||||
(attach-resolvers {:get-invoice-page gq-invoices/get-invoice-page
|
||||
:get-all-invoices gq-invoices/get-all-invoices
|
||||
:get-all-payments get-all-payments
|
||||
:get-payment-page gq-checks/get-payment-page
|
||||
:get-transaction-page gq-transactions/get-transaction-page
|
||||
|
||||
Reference in New Issue
Block a user