Skip to content

Commit

Permalink
use 'transform-finite' projection for nullable constraint and map ord…
Browse files Browse the repository at this point in the history
…ering.

'transform-finite' has better performance for deeply nested structures
since it avoids rewrapping of the transformation result.
  • Loading branch information
Yannick Scherer committed Apr 25, 2017
1 parent e27f5b7 commit 5136b33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/alumbra/claro/projection.clj
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

(defn- non-nullable-value
[{:keys [field-name type-name]} projection]
(projection/transform
(projection/transform-finite
(fn [value]
(if (nil? value)
(data/error
Expand Down Expand Up @@ -140,7 +140,7 @@
selection-set))]
(->> templates
(projection/juxt*)
(projection/transform as-ordered-map))
(projection/transform-finite as-ordered-map))
{}))

;; ## Conditional Blocks
Expand Down

0 comments on commit 5136b33

Please sign in to comment.