fixed warnings.
This commit is contained in:
@@ -1,28 +1,27 @@
|
||||
(ns auto-ap.graphql
|
||||
(:require
|
||||
[auto-ap.datomic :refer [merge-query uri]]
|
||||
[auto-ap.datomic.checks :as d-checks]
|
||||
[auto-ap.datomic.users :as d-users]
|
||||
[auto-ap.graphql.accounts :as gq-accounts]
|
||||
[auto-ap.graphql.checks :as gq-checks]
|
||||
[auto-ap.graphql.ezcater :as gq-ezcater]
|
||||
[auto-ap.graphql.clients :as gq-clients]
|
||||
[auto-ap.graphql.expected-deposit :as gq-expected-deposit]
|
||||
[auto-ap.graphql.ezcater :as gq-ezcater]
|
||||
[auto-ap.graphql.import-batch :as gq-import-batches]
|
||||
[auto-ap.graphql.intuit-bank-accounts :as gq-intuit-bank-accounts]
|
||||
[auto-ap.graphql.reports :as gq-reports]
|
||||
[auto-ap.graphql.invoices :as gq-invoices]
|
||||
[auto-ap.graphql.ledger :as gq-ledger]
|
||||
[auto-ap.graphql.plaid :as gq-plaid]
|
||||
[auto-ap.graphql.reports :as gq-reports]
|
||||
[auto-ap.graphql.requests :as gq-requests]
|
||||
[auto-ap.graphql.sales-orders :as gq-sales-orders]
|
||||
[auto-ap.graphql.transaction-rules :as gq-transaction-rules]
|
||||
[auto-ap.graphql.transactions :as gq-transactions]
|
||||
[auto-ap.graphql.users :as gq-users]
|
||||
[auto-ap.graphql.utils :refer [assert-admin assert-can-see-client]]
|
||||
[auto-ap.graphql.utils :refer [assert-admin]]
|
||||
[auto-ap.graphql.vendors :as gq-vendors]
|
||||
[auto-ap.graphql.yodlee-merchants :as ym]
|
||||
[auto-ap.graphql.yodlee2 :as gq-yodlee2]
|
||||
[auto-ap.graphql.plaid :as gq-plaid]
|
||||
[auto-ap.logging :refer [error-event info-event warn-event]]
|
||||
[auto-ap.time :as time]
|
||||
[clj-time.coerce :as coerce]
|
||||
@@ -30,14 +29,14 @@
|
||||
[clojure.string :as str]
|
||||
[clojure.tools.logging :as log]
|
||||
[clojure.walk :as walk]
|
||||
[com.unbounce.dogstatsd.core :as statsd]
|
||||
[com.walmartlabs.lacinia :refer [execute]]
|
||||
[com.walmartlabs.lacinia.parser :as p]
|
||||
[com.walmartlabs.lacinia.schema :as schema]
|
||||
[com.walmartlabs.lacinia.util :refer [attach-resolvers]]
|
||||
[datomic.api :as d]
|
||||
[unilog.context :as lc]
|
||||
[yang.time :refer [time-it]]
|
||||
[com.unbounce.dogstatsd.core :as statsd]
|
||||
[com.walmartlabs.lacinia.parser :as p])
|
||||
[yang.time :refer [time-it]])
|
||||
(:import
|
||||
(clojure.lang IPersistentMap)))
|
||||
|
||||
@@ -609,7 +608,7 @@
|
||||
|
||||
|
||||
|
||||
(defn get-user [context args value]
|
||||
(defn get-user [context args _]
|
||||
(assert-admin (:id context))
|
||||
|
||||
(let [users (d-users/get-graphql args)]
|
||||
@@ -619,7 +618,7 @@
|
||||
|
||||
|
||||
|
||||
(defn get-expense-account-stats [context {:keys [client_id] } value]
|
||||
(defn get-expense-account-stats [_ {:keys [client_id] } _]
|
||||
(let [result (cond-> {:query {:find ['?account '?account-name '(sum ?amount)]
|
||||
:in ['$]
|
||||
:where []}
|
||||
@@ -645,7 +644,7 @@
|
||||
(<= x 60 ) :due-60
|
||||
:else :due-later))
|
||||
|
||||
(defn get-invoice-stats [context {:keys [client_id] } value]
|
||||
(defn get-invoice-stats [_ {:keys [client_id] } _]
|
||||
(let [result (cond-> {:query {:find ['?name '(sum ?outstanding-balance) '(sum ?total)]
|
||||
:in ['$]
|
||||
:where []}
|
||||
@@ -687,7 +686,7 @@
|
||||
|
||||
(def first-week-a (coerce/to-date-time #inst "1999-12-27T00:00:00.000-07:00"))
|
||||
|
||||
(defn get-cash-flow [context {:keys [client_id]} value]
|
||||
(defn get-cash-flow [_ {:keys [client_id]} _]
|
||||
(when client_id
|
||||
(let [{:client/keys [week-a-credits week-a-debits week-b-credits week-b-debits forecasted-transactions ]} (d/pull (d/db (d/connect uri)) '[*] client_id)
|
||||
total-cash (reduce
|
||||
@@ -841,7 +840,7 @@
|
||||
(defn query-name [q]
|
||||
(try
|
||||
(str/join "__" (map name (:operations (p/operations (p/parse-query schema q)))))
|
||||
(catch Exception e
|
||||
(catch Exception _
|
||||
"unknown query")))
|
||||
|
||||
(defn query
|
||||
|
||||
Reference in New Issue
Block a user