vegabook

vegabook

Is the PragProg Absinthe book still relevant?

I’m starting my journey with GraphQL, and I own a book from Pragmatic Programmers called Craft GraphQL APIs in Elixir with Absinthe. However this book dates from March of 2018 so it’s more than 5 years old. I’m wondering if I’m wasting my time going through this book; seems like Absinthe has had tons of commits since that time so there may be better resources out there?

Any views? Is the book still the best place to start? I’m kind of a total beginner on GraphQL though I know the principles and I know Postgres/SQL/relational theory very well.

Marked As Solved

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

Hey!

Short answer: yes. Particularly as a total beginner.

Longer answer: While Absinthe has had a lot of commits since the book it is still a 1.X version, there have been no backwards incompatible changes introduced. The GraphQL spec itself hasn’t introduced any backwards incompatible changes, and while the libraries around Absinthe like Phoenix and Ecto have added major features (like live view) the bits used by Absinthe haven’t changed. It’s honestly a testament to the stability and foresight of the community.

The big unknown: Will the book’s dependencies run on a modern machine? The code that ships with the book is as you note pretty old at this point and it asks you to run a pretty old version of erlang and elixir. I don’t know of that’s going to work on say a modern M1 macbook.

I’ll give it a whirl this weekend, I haven’t tried to get it up and running in a long time.

10
Post #3

Also Liked

hubertlepicki

hubertlepicki

I suspect we could summon @benwilson512 here but I suspect it’s still relevant.

I’m using Absinthe in a project for about that long (sic!) and we barely ever had to touch the existing resolvers or subscriptions as they continue to work. Maybe there are some new conventions in use, but I don’t remember any breaking major breaking changes since, with one exception of something related to how you hook them up to PubSub, but that was something minor.

vegabook

vegabook

Great news thanks @benwilson512 book is great btw been sitting on my bookshelf for a couple of years but took it to the coffee shop and next thing I knew I had been there over 2 hours :wink: Nix has a bunch of older Elixir releases going back to 1.10 in 2020 so might mitigate some issues with any older versions. And there’s always good 'ol ‘asdf’ which goes back ages.

GPrimola

GPrimola

I recently purchased this book from @pragprog and the version I have is P2.0 from April/2020.
Though the book don’t mention Absinthe’s version used on it, If you take a look at the releases absinthe versions | Hex you will see that should be ~>1.5.

The book is a great place to start since it will take you by the hand and walk you through everything about Absinthe and thus GraphQL.

If you’re short on cash, Absinthe has a very good documentation, you can start there. But since there are a lot of new concepts, mostly due to GraphQL’s world, not only Absinthe’s, you may find yourself lost. Plus if you’re new to functional programming Absinthe documentation won’t help too much on that.

Otherwise I’d consider to start with the book indeed, and don’t mind the version of Absinthe, after you build your GraphQL API, you should be able to upgrade to newer Absinthe’s versions without the need of relearning the fundamentals. :smiley:

Keep in mind GraphQL has nothing to do with Relational databases. If I had to compare, I’d say GraphQL is more related to API Controllers and JSON.
You can add Absinthe (GraphQL) to an existing Elixir/Phoenix API without changing the layers of your application, and if it’s well designed, you can even reuse your data-layer modules on your GraphQL resolvers (the “controllers” of a GraphQL API).

Where Next?

Popular in Questions Top

nobody
How to bind a phoenix app to a specific ip address? could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
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

Other popular topics Top

WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement