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
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.
Also Liked
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
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
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
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. ![]()
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).
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









