started adding graphql

This commit is contained in:
Bryce Covert
2018-04-10 18:36:20 -07:00
parent 53905c317b
commit 4165c7d180
9 changed files with 136 additions and 7 deletions

View File

@@ -15,3 +15,6 @@
(defn upsert [id data]
(j/update! (get-conn) :companies (clj->db data) ["id = ?" (Integer/parseInt id)] )
(parse (first (j/query (get-conn) ["SELECT * FROM companies WHERE id = ?" (Integer/parseInt id)]))))
(defn get-by-id [id]
(parse (first (j/query (get-conn) ["SELECT * FROM companies WHERE id = ?" id]))))