From a1d671283a6aa60075a283d19e4f208b0b8aa307 Mon Sep 17 00:00:00 2001 From: Hyunwoo Nam Date: Sat, 3 Feb 2024 18:52:37 +0900 Subject: [PATCH] fix tests --- src/com/walmartlabs/lacinia/executor.clj | 11 +++++++++-- test/com/walmartlabs/lacinia/executor_test.clj | 2 -- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/com/walmartlabs/lacinia/executor.clj b/src/com/walmartlabs/lacinia/executor.clj index 75926183..f81a4d6e 100644 --- a/src/com/walmartlabs/lacinia/executor.clj +++ b/src/com/walmartlabs/lacinia/executor.clj @@ -181,9 +181,16 @@ is an ResultTuple." [left-value right-value] (if (su/is-result-tuple? right-value) - (let [{:keys [alias value]} right-value] - (if (contains? left-value alias) + (let [{:keys [alias value]} right-value + left-alias-value (alias left-value)] + (cond + (= left-alias-value :com.walmartlabs.lacinia.schema/null) + left-value + + (map? left-alias-value) (update left-value alias deep-merge value) + + :else (assoc left-value alias value))) (deep-merge left-value right-value))) diff --git a/test/com/walmartlabs/lacinia/executor_test.clj b/test/com/walmartlabs/lacinia/executor_test.clj index 6a002602..591899a0 100644 --- a/test/com/walmartlabs/lacinia/executor_test.clj +++ b/test/com/walmartlabs/lacinia/executor_test.clj @@ -93,5 +93,3 @@ query MyQuery { id } }"))))) - -(clojure.test/run-test deep-merge-on-error) \ No newline at end of file