Hi Nick, At Xerpa[1], we have being using graphql on a clojurescript project. It's an SPA that uses reagent with json api and its currently being converted to a re-frame one with graphql.
We studied the possibility of using relay modern and apollo client but decided to not use them at the moment. We started using graphql-builder[2] which is like yesql[3] but for graphql queries meaning that you write queries in another file directly using graphql and you can use those from clojurescript functions passing parameters when needed. It worked really well for the first couple of views but we found it not flexible enough for our needs in different views. After more research we found a new library venia[4] that uses clojure data structures to generate graphql queries. We needed a mechanism for merging queries requested by each component and requesting the merged query when the view changed. We wrote that in house and it's in production for a couple of months. I hope to find time to write more about that sometime but this is our experience so far. Cheers, mynomoto [1]: http://www.xerpa.com.br/ [2]: https://github.com/retro/graphql-builder [3]: https://github.com/krisajenkins/yesql [4]: https://github.com/Vincit/venia On Friday, June 30, 2017 at 9:52:40 PM UTC-3, Nick Pavlica wrote: > > Hi Dustin, > Thanks for addressing my question, and helping me better understand > ClojureScript, and the community! > > On Friday, June 30, 2017 at 2:35:40 PM UTC-6, Dustin Getz wrote: >> >> It's not clear to me that the cljs community has converged on graphql as >> a best practice. some people have certainly adopted it but it doesn't feel >> like there are very many to me. for example, Datomic has been doing what >> GraphQL offers plus much more since like 2013, it's not clear that graphql >> adds anything to what cljs users have already been doing since at least as >> long as facebook is been doing it internally. this isn't what you asked, >> but could explain the silence. >> > > I'm sure that GraphQL isn't that big of a deal from within the Clojure* > community, but it's pretty exciting when you are coming from traditional > environments where you deal with REST endpoints. I've done a little > research on Datomic, and it sounds awesome, but I haven't used it yet. In > my mind, GraphQL has some non technical advantages over Datomic. The > primary advantage is that it's an open specification, and not a proprietary > product. This allows for multiple implementations, and provides > opportunities for multiple support points. As it stands, there's only one > company that has a Datomic implementation, and if they go down so does your > tech stack. Additionally, if the current implementation of Datomic doesn't > have a feature or function you can't just add it yourself(At-least to my > knowledge); Another potential down side of having only one Datomic vendor, > is the potential of price gouging leading to unforscene budgeting issues. > I'm saying that Cognitech would act that way, but it's something that I > think should at-leas be considered. I'm sure an end to end Clojure stack, > plus Datomic is pretty sweet, I'm just now sure how many can go that > route. It makes me wonder if someone isn't thinking about an open > implementation. > > Many Thanks! > -- Nick > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/clojurescript.
