Skip to content

Commit

Permalink
ensure inline enum default values are canonicalized correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick Scherer committed May 10, 2017
1 parent b746e29 commit 7516bad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/alumbra/canonical/literal_value.clj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@

(defn- resolve-enum
[{:keys [schema]} {:keys [type-name non-null?] :as type} value]
(let [{:keys [enum-values]} (get-in schema [:enums type-name])]
(let [{:keys [enum-values]} (get-in schema [:enums type-name])
value (name value)]
(assert-type
(and enum-values (contains? enum-values value))
type
Expand Down

0 comments on commit 7516bad

Please sign in to comment.