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: 
acron0's avatar

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: 
      acron0's avatar

      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

      We use cookies and other tracking technologies to improve your browsing experience on our site, analyze site traffic, and understand where our audience is coming from. To find out more, please read our privacy policy.

      By choosing 'I Accept', you consent to our use of cookies and other tracking technologies.

      We use cookies and other tracking technologies to improve your browsing experience on our site, analyze site traffic, and understand where our audience is coming from. To find out more, please read our privacy policy.

      By choosing 'I Accept', you consent to our use of cookies and other tracking technologies. Less

      We use cookies and other tracking technologies... More