You can now kind of choose a yodlee merchant

This commit is contained in:
Bryce Covert
2019-05-16 09:19:22 -07:00
parent b488ad6302
commit 6d85c2d67c
8 changed files with 72 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
(ns auto-ap.datomic.yodlee-merchants
(:require [datomic.api :as d]
[auto-ap.graphql.utils :refer [->graphql]]
[auto-ap.datomic :refer [uri merge-query]]))
(defn get-merchants [args]
;; TODO admin?
(let [query {:query {:find ['(pull ?e [:yodlee-merchant/name :yodlee-merchant/yodlee-id])]
:in ['$]
:where [['?e :yodlee-merchant/name]]}
:args [(d/db (d/connect uri))]}]
(->>
(d/query query)
(mapv first))))