Aporro

Aporro

Seeking help with elixir development environment and absinthe subscriptions

Hi everyone,

I’m reaching out today for some guidance on setting up an Elixir development environment with an effective linter. I’m a university student trying out my hand on a side project that involves full-stack development, and I was particularly interested in exploring Elixir due to its potential for high concurrency, GraphQL subscriptions through Absinthe, and a light introduction to functional programming.

Initially, I was drawn to the Phoenix framework with its channel support for websockets and Absinthe for GraphQL. However, I’ve encountered some challenges in setting up the environment and getting started with Absinthe subscriptions.

Here’s what I’ve tried so far:

  • IDEs: Since I’m a JetBrains IDE user, I initially looked for a linter but the biggest elixir linter people suggested didnt (to my knowledge still doesnt) have support for the 2024 versions of the ides.
  • VS Code: I switched to VS Code with the Elixir Language Server extension. However, it warned me about potential bugs with Erlang 26 on Windows, and subsequent troubleshooting attempts weren’t successful.
  • Dev Containers: I explored using Dev Containers with GitHub Codespaces, but unfortunately, encountered different but similar issues (something about the elixir command not being found) which I also failed to debug
  • WSL Setup: Finally, I managed to set up a development environment within WSL, and while the linter seems to work for basic syntax errors, it doesn’t provide more comprehensive assistance like reference checking for non-existent modules or function signature validation. This lack of advanced features significantly impacts development speed for a newcomer to the language (i was also concernend to see code compiling just fine while referencing modules that dont exist, not sure if thats a quirk of the launguage).
  • Absinthe Subscriptions: Additionally, I struggled to achieve a minimum working example of Absinthe subscriptions using the provided documentation with the GitHub repository demo seeming dated (7 years), I understand that tutorials might also require some updates.

I understand that there might be a learning curve involved, and I’m more than willing to put in the work. However, I’ve never encountered such a frustrating setup process with any other development environment or launguage, i may be spoiled but i am used to this kind of tooling just working.

Truth is I am convinced it’s my fault, it just has to be since everything I’ve heard is about how newbie friendly and productive elixir is and how good the developer experience is and i genuinely wish someone is able to show me what horrible mistake I’ve made to go from that to this

My Questions:

  • Would anyone be willing to share their Elixir development environment setup that offers as much tooling as possible and how to set it up?
  • Are there any up to date resources or tutorials demonstrating how to implement Absinthe subscriptions or a working demo of some kind i can pick apart?

Any guidance or insights you can provide would be tremendously helpful because I am genuinely out of ideas!

Thank you,

First Post!

jmnda

jmnda

Hi, sorry that you didn’t get any response. I will try to answer some of the questions:

IDEs I would recommend VS Code, then install both the elixir-tools and Elixir LS extensions for better language server experience.

Dev Containers: There is a template configuration HERE for an Elixir Dev container environment with Phoenix, Node and PostgreSQL installed, which you could use and customize to your liking.

Absinthe Subscriptions: The only resource that comes to mind is this course by Pragmatic Studio. The course does have you might be looking for, although it’s paid. There also the book Craft GraphQL APIs in Elixir with Absinthe.

Where Next?

Popular in Questions Top

openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
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
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
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
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

We're in Beta

About us Mission Statement