a bunch of cleanup to remove stuff
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
(ns auto-ap.graphql
|
||||
(:require
|
||||
[auto-ap.datomic :refer [conn merge-query query2]]
|
||||
[auto-ap.datomic.users :as d-users]
|
||||
[auto-ap.graphql.accounts :as gq-accounts]
|
||||
[auto-ap.graphql.checks :as gq-checks]
|
||||
[auto-ap.graphql.clients :as gq-clients]
|
||||
@@ -16,7 +15,6 @@
|
||||
[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 attach-tracing-resolvers]]
|
||||
[auto-ap.graphql.vendors :as gq-vendors]
|
||||
[auto-ap.graphql.yodlee-merchants :as ym]
|
||||
@@ -353,14 +351,6 @@
|
||||
:resolve :get-cash-flow}
|
||||
|
||||
|
||||
:account_page {:type :account_page
|
||||
:args {:name_like {:type 'String}
|
||||
:numeric_code {:type 'Int}
|
||||
:start {:type 'Int}
|
||||
:per_page {:type 'Int}
|
||||
:sort {:type '(list :sort_item)}}
|
||||
:resolve :get-accounts}
|
||||
|
||||
:all_accounts {:type '(list :account)
|
||||
:args {}
|
||||
:resolve :get-all-accounts}
|
||||
@@ -407,8 +397,7 @@
|
||||
:per_page {:type 'Int}
|
||||
:sort {:type '(list :sort_item)}}
|
||||
:resolve :get-vendor}
|
||||
:user {:type '(list :user)
|
||||
:resolve :get-user}
|
||||
|
||||
:vendor_by_id {:type :vendor
|
||||
:args {:id {:type :id}}
|
||||
:resolve :vendor-by-id}
|
||||
@@ -427,12 +416,6 @@
|
||||
:date_range {:fields {:start {:type :iso_date}
|
||||
:end {:type :iso_date}}}
|
||||
|
||||
:edit_user
|
||||
{:fields {:id {:type :id}
|
||||
:name {:type 'String}
|
||||
:role {:type :role}
|
||||
:clients {:type '(list String)}}}
|
||||
|
||||
:add_contact
|
||||
{:fields {:id {:type :id}
|
||||
:name {:type 'String}
|
||||
@@ -574,11 +557,6 @@
|
||||
:to {:type :id}}
|
||||
:resolve :mutation/merge-vendors}
|
||||
|
||||
:edit_user
|
||||
{:type :user
|
||||
:args {:edit_user {:type :edit_user}}
|
||||
:resolve :mutation/edit-user}
|
||||
|
||||
:upsert_vendor
|
||||
{:type :vendor
|
||||
:args {:vendor {:type :add_vendor}}
|
||||
@@ -588,11 +566,7 @@
|
||||
{:type :transaction_rule
|
||||
:args {:transaction_rule {:type :edit_transaction_rule}}
|
||||
:resolve :mutation/upsert-transaction-rule}
|
||||
|
||||
:upsert_account
|
||||
{:type :account
|
||||
:args {:account {:type :edit_account}}
|
||||
:resolve :mutation/upsert-account}}})
|
||||
}})
|
||||
|
||||
|
||||
(defn snake->kebab [s]
|
||||
@@ -619,18 +593,6 @@
|
||||
node))
|
||||
m))
|
||||
|
||||
(defn get-user [context args _]
|
||||
(assert-admin (:id context))
|
||||
|
||||
(let [users (->> (d-users/get-graphql args)
|
||||
(map (fn [u]
|
||||
(assoc u :impersonate_jwt
|
||||
(jwt/sign (auth/user->jwt u "FAKE_TOKEN")
|
||||
(:jwt-secret env)
|
||||
{:alg :hs512})))))]
|
||||
(->graphql users)))
|
||||
|
||||
|
||||
|
||||
(defn get-expense-account-stats [_ {:keys [client_id] } _]
|
||||
(let [query (cond-> {:query {:find ['?account '?account-name '(sum ?amount)]
|
||||
@@ -791,7 +753,6 @@
|
||||
(-> integreat-schema
|
||||
(attach-tracing-resolvers
|
||||
{
|
||||
:get-accounts gq-accounts/get-graphql
|
||||
:get-all-accounts gq-accounts/get-all-graphql
|
||||
:get-transaction-rule-page gq-transaction-rules/get-transaction-rule-page
|
||||
:get-transaction-rule-matches gq-transaction-rules/get-transaction-rule-matches
|
||||
@@ -802,14 +763,11 @@
|
||||
:get-intuit-bank-accounts gq-intuit-bank-accounts/get-intuit-bank-accounts
|
||||
:vendor-by-id gq-vendors/get-by-id
|
||||
:account-for-vendor gq-accounts/default-for-vendor
|
||||
:get-user get-user
|
||||
:mutation/delete-transaction-rule gq-transaction-rules/delete-transaction-rule
|
||||
:mutation/edit-user gq-users/edit-user
|
||||
:mutation/upsert-transaction-rule gq-transaction-rules/upsert-transaction-rule
|
||||
:test-transaction-rule gq-transaction-rules/test-transaction-rule
|
||||
:run-transaction-rule gq-transaction-rules/run-transaction-rule
|
||||
:mutation/upsert-vendor gq-vendors/upsert-vendor
|
||||
:mutation/upsert-account gq-accounts/upsert-account
|
||||
:mutation/merge-vendors gq-vendors/merge-vendors
|
||||
:get-vendor gq-vendors/get-graphql
|
||||
:search-vendor gq-vendors/search
|
||||
|
||||
Reference in New Issue
Block a user