This repository was archived by the owner on Aug 16, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 44 :license {:name " EPL-2.0"
55 :url " https://www.eclipse.org/legal/epl-2.0/" }
66 :dependencies [[org.clojure/clojure " 1.10.1" ]
7- [org.graphqlize/graphqlize " 0.1.0-alpha-1 " ]]
7+ [org.graphqlize/graphqlize " 0.1.0-alpha-3 " ]]
88 :java-source-paths [" java" ]
99 :profiles {:test {:dependencies [[org.postgresql/postgresql " 42.2.10" ]]}})
Original file line number Diff line number Diff line change 11(ns graphqlize.java-interop
2- (:require [honeyeql.db :as heql-db]
3- [clojure.data.json :as json]
2+ (:require [clojure.data.json :as json]
43 [com.walmartlabs.lacinia :as lacinia]
54 [graphqlize.lacinia.core :as gql-lacinia])
65 (:import [org.graphqlize.java GraphQLResolver]
76 [javax.sql DataSource]))
87
98(defn initialize [^DataSource db-spec]
10- (let [db-adapter (honeyeql.db/initialize db-spec)
11- lacinia-schema (gql-lacinia/schema db-adapter)]
9+ (let [lacinia-schema (gql-lacinia/schema db-spec)]
1210 (reify GraphQLResolver
1311 (resolve [_ query]
1412 (json/write-str (lacinia/execute lacinia-schema query nil nil ))))))
You can’t perform that action at this time.
0 commit comments