From 9076f19ac225e39e1c022f0d4994051df09417f3 Mon Sep 17 00:00:00 2001 From: egs33 Date: Thu, 5 Dec 2024 11:31:27 +0900 Subject: [PATCH] Add enable-introspection option to Lacinia component --- src/toyokumo/commons/experimental/graphql/lacinia.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/toyokumo/commons/experimental/graphql/lacinia.clj b/src/toyokumo/commons/experimental/graphql/lacinia.clj index 06faa12..984b77f 100644 --- a/src/toyokumo/commons/experimental/graphql/lacinia.clj +++ b/src/toyokumo/commons/experimental/graphql/lacinia.clj @@ -6,7 +6,7 @@ [com.walmartlabs.lacinia.schema :as l.schema] [com.walmartlabs.lacinia.util :as l.util])) -(defrecord Lacinia [sdl-path resolver compiled-schema] +(defrecord Lacinia [sdl-path enable-introspection? resolver compiled-schema] component/Lifecycle (start [this] (if-let [sdl (io/resource sdl-path)] @@ -14,7 +14,7 @@ slurp l.parser.schema/parse-schema (l.util/inject-resolvers (:resolvers resolver)) - l.schema/compile + (l.schema/compile {:enable-introspection? (boolean enable-introspection?)}) (->> (assoc this :compiled-schema))) (throw (IllegalArgumentException. (str "Schema Definition Language file can not find in " sdl-path))))) (stop [this]