theduke

theduke

GraphQL - absinthe vs graphql-elixir

Hey there.

I want to try out GraphQL in Elixir for a small project,
and there seem to be two competing implementations for Elixir.

http://graphql-elixir.org/ and http://absinthe-graphql.org/.

Both recently active and with equal amounts of GH stars.

Does anyone have experience with either, and can comment on the differences?

Most Liked

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

Hey there!

Disclaimer: I’m one of the authors of Absinthe. You can find my slides from ElixirConf here, hopefully the talk itself up soon: No REST for the Wicked - Speaker Deck

Absinthe was created about 9 months ago when we really wanted to use GraphQL in production here at http://cargosense.com/. At the time graphql-elixir was still rather young and we had production needs we wanted to move on very quickly.

Our goal was to make something correct, easy to use, idiomatic, and performant. In concrete terms this means we right now:

  • Validate your schema at compile time. This catches errors, sets defaults with zero overhead, and ensures maximum performance by baking computed data into functions
  • Return extensive error information when queries are executed, helping your clients better use your API.
  • Secondary libraries to assist with common client side patterns like Relay Connections
  • Easy use of anonymous functions in schemas.

It means in the future:

  • We’re reworking execution to be user extensible.
  • This new execution model will enable subscriptions and fancy directives like @defer, @live
  • Our new execution branch has tests we copied almost verbatim from the reference implementation
  • We’re aiming to enable pre-compiled documents for when you want to shave off those last microseconds from a query.

Do you have any specific questions?

11
Post #2
benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

We found a version of GraphIQL the other day that made setting headers easy, we hope to add that soon. With that capability it should be easy to set JWT headers or other header based authentication methods.

OvermindDL1

OvermindDL1

I’ve used a bit of absinthe, but from what I’ve seen it seems GraphQL is more low level and last I saw it did not have the (graphql-spec-required) documentation paths. Absinthe does more for you and follows the spec better, but you do have to work ‘within’ it more. I ended up choosing Absinthe for a few reasons and of the little area I’ve used it, it was quite nice.

For note, GraphQL is a lot older than Absinthe, Absinthe is quite new and was made to follow the spec as well as it does. If they have the same stars now (they certainly did not when it was new just recently) then that says something about Absinthe as well.

Last Post!

themarlzy

themarlzy

Thanks for letting me know. The audio isn’t THAT bad, and more than made up for the content.

Where Next?

Popular in Questions Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54260 488
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42716 114
New

We're in Beta

About us Mission Statement