started making graphql do the right thing.

This commit is contained in:
Bryce Covert
2018-08-10 22:36:37 -07:00
parent 8ebd3da0c7
commit cbbabb2219
4 changed files with 28 additions and 10 deletions

View File

@@ -0,0 +1,15 @@
(ns auto-ap.datomic.clients
(:require [datomic.api :as d]
[auto-ap.datomic :refer [uri]]))
(defn get-all []
(->> (d/q '[:find (pull ?e [*])
:where [?e :client/name]]
(d/db (d/connect uri)))
(map first)
(map (fn [c]
(update c :client/bank-accounts
(fn [bas]
(map (fn [ba]
(update ba :bank-account/type :db/ident ))
bas)))))))