tendant / graphql-clj

A Clojure library that provides GraphQL implementation.
Eclipse Public License 1.0
285 stars 22 forks source link

Avoid ambiguity between BooleanValue and EnumValue #8

Closed aew closed 8 years ago

aew commented 8 years ago

Was parsing:

query WithDefaultValues(
          $a: Int = 1,
          $b: String = "ok",
          $c: ComplexInput = { requiredField: true, intField: 3 }
        ) {
          dog { name }
        }

as:

:variable-definitions
     {"a" {:type [:named-type "Int"], :default-value 1},
      "b" {:type [:named-type "String"], :default-value "ok"},
      "c" {:type [:named-type "ComplexInput"], :default-value {"requiredField" [:enum-value [:name "true"]], "intField" 3}}}

Similar for TypeFieldArgumentDefaults and InputTypeFields. See new tests for proposed behavior.