Skip to content

Commit 9076f19

Browse files
committed
Add enable-introspection option to Lacinia component
1 parent 728689b commit 9076f19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines 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)