Skip to content

Commit

Permalink
another trial
Browse files Browse the repository at this point in the history
  • Loading branch information
namenu committed Jul 1, 2024
1 parent 701b4cd commit b7b8d5e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/com/walmartlabs/lacinia/internal_utils.clj
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,22 @@
nil
coll))

(defn- null?
[v]
(or (nil? v)
(= v :com.walmartlabs.lacinia.schema/null)))

(defn deep-merge
"Merges two maps together. Later map override earlier.
If a key is sequential, then each element in the list is merged."
[left right]
(cond
(null? left)
left

(null? right)
right

(and (map? left) (map? right))
(merge-with deep-merge left right)

Expand Down

0 comments on commit b7b8d5e

Please sign in to comment.