making everyone do queries the same way.

This commit is contained in:
Bryce Covert
2019-05-04 19:40:29 -07:00
parent e6a36b190a
commit 1232033160
3 changed files with 74 additions and 95 deletions

View File

@@ -14,12 +14,11 @@
[clojure.set :as set]))
(defn get-invoice-page [context args value]
(println "HI")
(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
[invoices invoice-count] (d-invoices/get-graphql (<-graphql (assoc args :id (:id context))))]
(println "HELLO" (take 1 invoices ) invoice-count)
[{:invoices (map ->graphql invoices)
:total invoice-count
:count (count invoices)
:start (:start args 0)