Leona doesn't extract enums from input specs which leads to compile failure

Work started
Pull requests: 0
Contributors: 1
Level: Intermediate
  • Clojure
Work started
Pull requests: 0
Contributors: 1
Level: Intermediate
  • Clojure

On GitHub

spec -> lacinia schema
More info >

Issue posted by: 

Antony

Description

For example

(s/def ::my-value int?)
(s/def ::my-object (s/keys :req-un [::my-value]))
(s/def ::my-query-enum #{"foo" "bar" "baz"})
(s/def ::query-args (s/keys :req-un [::my-query-enum]))

(-> (leona/create)
    (leona/attach-query ::query-args ::my-object some-handler)
    (leona/compile))

... will fail, because ::my-query-enum does not appear in the :enums map of the generated schema.

Error:

Argument `my_query_enum' of field `QueryRoot/my_object' references unknown type `my_query_enum'.
  • bug
  • good first issue
  • help wanted

Use Open Source Issues to hire or get hired

Other Issues from this company

View all
/
/
    /
    /

      On GitHub

      spec -> lacinia schema
      More info >

      Issue posted by: 

      Antony

      Use Open Source Issues to hire or get hired

      Leona doesn't extract enums from input specs which leads to compile failure
      View on GitHub