retro / graphql-builder

GraphQL client library for Clojure and ClojureScript
MIT License
184 stars 15 forks source link

Added support for recursively parsing argument values #18

Closed mharju closed 4 years ago

mharju commented 4 years ago

Hi!

Thanks for this awesome library. We have started using it in our project and noticed that the object value parsing does not handle situtations that we currently have, e.g.

query Search($productNumber: String!) {
    products(filter: {productNumber: {equalTo: $productNumber}}) {
        nodes {
            id
            productNumber
            names
        }
    }
}

This PR adds a recursive handling for any parameters in the arguments. Seems to be working for our use case – let me know if there are any corners that I have not noticed. The tests seem to be still passing.