[ANN] graphql-clj 0.2.0

266 views
Skip to first unread message

Lei

unread,
Apr 24, 2017, 2:24:22 PM4/24/17
to Clojure
graphql-clj is a Clojure library that provides GraphQL implementation.

In this new version 0.2.0,  schema and query validator have been completely rewritten for simplicity and robustness. APIs have simplified in this new version as well.

The github repository is: https://github.com/tendant/graphql-clj

Any comments and advices are welcome!

Cheers,
Lei

Didier

unread,
Apr 24, 2017, 10:29:24 PM4/24/17
to Clojure
How does this compare to Lacinia?

Lei

unread,
Apr 28, 2017, 1:08:26 AM4/28/17
to clo...@googlegroups.com
Good question.

Before I answer it directly, please allow me to share some history about GraphQL.

Back 2016, I felt the pain of maintaining different versions of RESTful api for both web application and mobile application. I believed GraphQL was the answer. So I tried to look around, there was no available GraphQL implementation in Clojure Community.I loved GraphQL so much, so I decided to implement one in Clojure.

I started with GraphQL parser, it was done very quickly with the help of Instaparse. In the middle of 2016, the 0.1.0 version of graphq-clj was released. After the release, a lot of people from the community helped building this library, especially from Edward in Nebank. Early 2017, myself and one of my team member JeffI started rewriting the parser and validator. The purpose of the rewrite was to simplify the implementation and make validation process more predictable and robust.

Here are few main ideas about graphql-clj:

1. Provides parser and validator for GraphQL schema langurage. User don't need to learn anything new other than GraphQL schema spec. This is probably one major difference.
2. Simple API. To start using GraphQL with graphql-clj, only two API functions(resolver and execution) are needed.

A demo project has been provided showing how to use graphql-clj: https://github.com/tendant/graphql-clj-starter. It has GraphiQL build-in, you can try it yourself.

graphql-clj is still evolving, any comments and advices are very welcome.

Lacinia was just open sourced recently, I only read some document about it.

There is also another option named alumbra worth trying as well. It is good to have options.



--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matthew Boston

unread,
Apr 30, 2017, 2:23:11 PM4/30/17
to Clojure
The first, and biggest difference that I see, is that a schema is defined as a single string in graphql-clj, but Lacinia uses data structures to describe your graphql schema. The latter being more easily composable, if that's something you need.
Reply all
Reply to author
Forward
0 new messages