From 9076f19ac225e39e1c022f0d4994051df09417f3 Mon Sep 17 00:00:00 2001 From: egs33 Date: Thu, 5 Dec 2024 11:31:27 +0900 Subject: [PATCH 1/2] 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] From f8cd1794fe4a98f969f43310a071608a6c954fac Mon Sep 17 00:00:00 2001 From: egs33 Date: Thu, 5 Dec 2024 11:33:57 +0900 Subject: [PATCH 2/2] Add CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cc9055..ed62b8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Change Log ## [Unreleased] +### Breaking +- Add `enable-introspection` option to Lacinia component. If you want to enable introspection, you need to set `enable-introspection` to `true` explicitly. ## 0.3.195 ### Changed