Skip to content

Commit bf5840a

Browse files
authored
Merge pull request #29 from toyokumo/add-enable-introspection-option-to-gql
Add enable introspection option to gql
2 parents 728689b + f8cd179 commit bf5840a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Change Log
22

33
## [Unreleased]
4+
### Breaking
5+
- Add `enable-introspection` option to Lacinia component. If you want to enable introspection, you need to set `enable-introspection` to `true` explicitly.
46

57
## 0.3.195
68
### Changed

src/toyokumo/commons/experimental/graphql/lacinia.clj

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
[com.walmartlabs.lacinia.schema :as l.schema]
77
[com.walmartlabs.lacinia.util :as l.util]))
88

9-
(defrecord Lacinia [sdl-path resolver compiled-schema]
9+
(defrecord Lacinia [sdl-path enable-introspection? resolver compiled-schema]
1010
component/Lifecycle
1111
(start [this]
1212
(if-let [sdl (io/resource sdl-path)]
1313
(-> sdl
1414
slurp
1515
l.parser.schema/parse-schema
1616
(l.util/inject-resolvers (:resolvers resolver))
17-
l.schema/compile
17+
(l.schema/compile {:enable-introspection? (boolean enable-introspection?)})
1818
(->> (assoc this :compiled-schema)))
1919
(throw (IllegalArgumentException. (str "Schema Definition Language file can not find in " sdl-path)))))
2020
(stop [this]

0 commit comments

Comments
 (0)