Fork me on GitHub
#graphql
<
2017-07-13
>
rickmoynihan09:07:14

Curious about the state of graphql in clojure. How mature are the clojure graphql implementations? Which one is the most mature, is anyone using it in production? And how easy is it to optimize the query-building/planning… I don’t know much about graphql, but I gather that’s what dataloader does? Do anyone of the clojure APIs support this?

rickmoynihan09:07:47

Similarly are the java implementations mature, and is it perhaps better to use one of those just now?

domkm09:07:38

@rickmoynihan graphql-java is terrible. We're using it in production but our use predates Lacinia. We're planning on switching to Lacinia when time permits. If anything, it appears to me that Lacinia is more mature than graphql-java.

rickmoynihan09:07:24

@domkm: interesting… Id’ve thought a java implementation would’ve been more mature at this stage

rickmoynihan09:07:37

I really don’t know much about graphql though

domkm09:07:43

So would I but I don't think it's the case

rickmoynihan09:07:05

is it possible to optimise the requests to the backend? For the data we plan to use it for, I suspect if we didn’t it’d be far too slow and result in way too many requests

hlship16:07:56

Please give the Lacinia documentation a skim; we've worked hard on it, and it answers your questions.

domkm09:07:45

What do you mean by "optimize," specifically?

rickmoynihan09:07:54

specifically the N+1 query problem

domkm09:07:59

Also what do you mean by "backend?" 😉

domkm09:07:07

Is backend the database(s)?

domkm09:07:16

or your CLJ/Java server(s)?

danielneal09:07:41

there's urania that looks interesting (https://github.com/funcool/urania), although I haven't tried it out. Inspired by https://github.com/kachayev/muse and Haxl/Stitch

domkm09:07:24

graphql-java and Lacinia should be similar in this respect with a slight edge given to Lacinia because it exposes more of the query data to resolvers

domkm09:07:52

Look into https://github.com/alumbra/alumbra if data batching is a primary concern. I can't speak to its completeness or maturity, though.

rickmoynihan09:07:42

wow ok, lots of different bits and pieces… not sure how easy it is to evaluate the viability of this. Am I right that the two main clojure implementations of graphql are: - lacinia - alumbra ? How do they compare in completeness to the spec/js-reference-implementation? And project longevity?

domkm09:07:06

Lacinia is used by Walmart and seems like the primary implementation currently. Alumbra focuses on data access. It seems cool (though complicated) and I don't know the state of the project. There's also https://github.com/tendant/graphql-clj which was not feature complete but may be now; I haven't kept track.

rickmoynihan09:07:41

@domkm: > Lacinia is used by Walmart Sounds like it might be quite mature then… Do we know what they’re using it for? I note that it’s from wallmartlabs, so is it experimental? Do they just use it for some small backend system, or to power critical infrastructure?

hlship15:07:03

WalmartLabs is just a clever name for Walmart's E-Commerce division. If you use the Walmart app on iOS or Android, or many of your requests are now routed through Lacinia. There are also other systems, related to grocery orders, built entirely in Lacinia. So, yes, Lacinia is mature and production capable.

domkm09:07:02

WalmartLabs is a team/department within Walmart, I don't think it's experimental

rickmoynihan10:07:47

Claro, Muse and Haxl look really interesting… Claro claims to be inspired by Muse… Does anyone know why it was created though? Why write a different library for the same thing? What was perceived to be deficient in muse?