Vincit / venia

Clojure(Script) graphql query generation
Eclipse Public License 1.0
197 stars 20 forks source link

Support aliases at nested level #15

Closed oliyh closed 6 years ago

oliyh commented 7 years ago

Hi, Thanks for creating Venia.

Would it be possible to add support for aliases at a nested level? e.g. expected:

(v/graphql-query {:venia/queries [[:employee {:id 1 :active true} 
                                                        [:name :address 
                                                         {:query/data [:friends [:name :email]]
                                                          :query/alias :best_friend}]]]})

=> "{employee(id:1,active:true){name,address,best_friend:friends{name,email}}}"

But currently returns nil (can't find any error messages though).

Thanks!

macluck commented 7 years ago

Hey, i'll take a look! :)