tendant / graphql-clj

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

Missing validation of dissimilar variable list types #47

Closed aew closed 7 years ago

aew commented 7 years ago

Because of this line: https://github.com/tendant/graphql-clj/blob/master/src/graphql_clj/validator/rules/variables_in_allowed_position.clj#L42

There is no effective validation for list type variables. A failing test case that illustrates this bug:

https://github.com/nubank/graphql-clj/compare/simplify-base-types...nubank:dissimilar-list-validation?expand=1

Related: https://github.com/tendant/graphql-clj/issues/43

tendant commented 7 years ago

The new validation should cover this case now.

Test cases can be found in:

https://github.com/tendant/graphql-clj/blob/0.2.3/test/graphql_clj/query_validator_test.clj#L573