Fork me on GitHub
#graphql
<
2017-10-11
>
xtreak2906:10:48

Hi. I wrote a blog post on using Lacinia : https://tirkarthi.github.io/clojure/2017/10/09/graphql-tutorial.html . I have a couple of questions and was asked to post here about it. Please find the questions as below :

1. I had a problem with arguments and value that when I resolve some related object in the query like resolving a track in an artist query then the artist information is passed as value to the get-track function and thus when I destructure for the same name using arguments and values then one of them will always be empty and the order of destructuring matters as in (.... Kindly add in the way in which this could be handled better. I have used :or to merge them with values. How can I destructure arguments and values in such a way that one of them which is null doesn't override the other?
2. Since I use HoneySQL for forming the queries I need to check whether the variable is null and then use it in merge-where. Any macro to simplify this or any recommended libraries based on your experience for SQL queries construction?

xtreak2912:10:01

I had question 1 answered at https://clojurians.slack.com/archives/C03S1KBA2/p1507719199000414 but open to any suggestions in Lacinia usage