TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Elixir, Phoenix, Absinthe, GraphQL, React, and Apollo

526 pointsby schneidmasterabout 6 years ago

19 comments

xliiabout 6 years ago
Stack described above is the one I’ve been working on for professionally for the last year and I wouldn’t recommend it.<p>Main reason is the absurd amount of complexity with costs heavily outhweighting benefits gained from the solution.<p>For example, simple task of adding new entity consists off: On backend: creating migration, creating data entity (Ecto), writing structure module (sanitization, validation, basic logic, if needed), mounting queries, writing input mutation(s), writing output query&#x2F;queries, unit testing On frontend: creating component, creating form, writing graphql queries, writing mutation, wrapping components&#x2F;queries in components, connecting query to components, providing action handlers for inputs, unit testing, integration testing<p>Now I have authors list. And even though I am full stack I haven’t yet spent even single minute on having Proper UX Design set in place. Oh, do we need to add author’s birthdate? Dang, let me adjust all of that.<p>In my opinion technical debt accumulates faster than in other solutions. GraphQL is complex. React (done right) is complex. Apollo is complex (Elixir is simple, yet it’s only one cog). Deciding on doing file upload in GraphQL led me to a rabbit hole, which took at least a week to dug out from.<p>When trying to find the source of all development issues my thoughts go towards GraphQL. Maybe it is too complex or we didn’t had enough experience in it? Yet it was really nice to work with when all the backend and frontend boilerplate was already written. It makes sense, even though requires some heavy thought behind it. Maybe it’s Apollo, which locks in one of two specific trains of thought, or Absinthe, which requires side-hacks in order to get some bit more advanced features working with Apollo, like file uploads or query batching.<p>From a perspective I’d say this is just too much. Every single part of this stack adds overhead to the other parts. Maybe if I had more specialized team members it would get easier, but being only 3 of us, with me, as a full stack, constantly switching between all of that was a tiresome, low-productive effort. Right now we’re disassembling app to a classic REST-app and we’re seeing development speed increase on week-to-week basis, even though we had to scrap most of the frontend.<p>I guess there would be some benefit on having the write up of all of it, since it doesn’t even scratch the surface of the year of development issues with this stack, but even in this very &quot;short&quot; form it may serve for a word of warning that this stack is not necessarily something you want to care for.
评论 #19717579 未加载
评论 #19717587 未加载
评论 #19717500 未加载
评论 #19717033 未加载
评论 #19717521 未加载
评论 #19716965 未加载
评论 #19718243 未加载
评论 #19719023 未加载
评论 #19727834 未加载
评论 #19717283 未加载
评论 #19717029 未加载
评论 #19717779 未加载
评论 #19717105 未加载
benwilson-512about 6 years ago
Hey folks! Co-Author of Absinthe here, happy to answer any questions about it. The post here is good, although these days we recommend using Dataloader vs Absinthe.Ecto. Dataloader really extends the idea behind Absinthe.Ecto while providing in request caching, pluggable backends, and easier query manipulation.
评论 #19716752 未加载
评论 #19715525 未加载
评论 #19716020 未加载
kuonabout 6 years ago
I just started a new app, and I decided to try Phoenix LiveView. It&#x27;s really simpler and easier to work with. It won&#x27;t work well with all kind of apps, especially those with offline support, but for many many apps&#x2F;website it is a good fit.<p>The last app I did was a mobile app written in Elm with Phoenix. I can&#x27;t recommend Elm enough, it makes JS much easier to work with. For communication I used a simple REST oriented API.<p>While I understand why GraphQL exists, I think it is a major addition in complexity for little to no benefits. I tried it, wrote half a project with it, but they removed it. When things gets complex (for example, let&#x27;s say the user.email field can be redacted under some conditions) your endpoint becomes really hard to manage. GraphQL certainly have a use for large API with graph oriented datasource (well, like facebook), but it is a specific use case.
评论 #19717763 未加载
评论 #19719400 未加载
sugarpileabout 6 years ago
Does anyone here who is working with elixir professionally have a sense of what kind of mastery is needed to jump into an elixir dev role? I&#x27;ve used it on and off for ~4 years at this point and in a few side projects (most recent one using everything in the title, weirdly enough) but can&#x27;t really tell if I&#x27;m &quot;qualified&quot; to look for a job in it. It&#x27;s this weird loop of &quot;I&#x27;ve only done something as a hobby so I&#x27;m not qualified to do it professionally&quot; vs &quot;If I don&#x27;t use it professionally I&#x27;ll never be qualified to do so&quot;.<p>Same goes for react.
评论 #19715661 未加载
评论 #19715707 未加载
评论 #19715563 未加载
评论 #19715803 未加载
评论 #19716690 未加载
评论 #19717222 未加载
diNgUrAndIabout 6 years ago
&gt; I also find a lot of joy in its pattern matching and its pipe operator. It’s refreshing writing heavily functional code that still approaches the beauty of ruby, and I find that it drives me to think clearly about my code and write fewer bugs as a result.<p>This.<p>I use Elixir everyday. While it feels &#x27;refreshing&#x27; to use pattern matching, sometimes it gets over-used, as a simple swtich-case statement is easier to read.<p>Same with pipe operator. I found newbie programmers tend to pipe for the pipe&#x27;s sake, and write functions just to form the &#x27;shape&#x27; of pipe, but the data shape changes are not easy to see and inspect.
评论 #19716369 未加载
hliyanabout 6 years ago
Great article. One point though (not aimed at the author).<p>The majority of engineering articles I see today are along the lines of &quot;X with Y, using Z&quot;, where X, Y, Z are specific products, frameworks or libraries, often trademarks.<p>I rarely see more generic engineering&#x2F;architecture topics such as: [virtual DOM based &#x2F; string based client side templating] with [JSON&#x2F;Protobuf] over [REST&#x2F;Websocket] with a [compiled &#x2F; interpreted &#x2F; JIT compiled &#x2F; virtual machine based] backend runtime, built on [RDBMS&#x2F;NoSQL&#x2F;hybrid] etc.<p>Am I alone in feeling this way?
评论 #19716720 未加载
评论 #19727257 未加载
em_jonesabout 6 years ago
I&#x27;ve just been trying to get back into elixir recently, myself. I&#x27;d done some basic crud &#x27;helloworld&#x27; stuff when I first tried about a year into professional development.<p>I&#x27;ve since had the Fortune to spend time learning about cloud native apps, distributed service patterns, and supporting infrastructure (spring cloud, pcf, vanilla k8s, gcp) and now returning to elixir having at least better understanding of what erlang and OTP offers.<p>I&#x27;m super excited to see I&#x27;m not alone in finding this sort of stack is worth fiddling with(although, I tend to pick Vue when not using angular for work).<p>Thanks for posting this!!<p>For those interested in what resources I&#x27;m leaning on: The Manning &#x27;Elixir in Action&#x27; and the Pragmatic Programmer&#x27;s graphql texts along with exercism.<p>Anybody else have any preferred resources for these technologies?
评论 #19715263 未加载
评论 #19715007 未加载
评论 #19715020 未加载
评论 #19716703 未加载
评论 #19715298 未加载
stephan83about 6 years ago
Elixir and OTP are really nice, but I&#x27;m frustrated by the type system, even with typespecs. I finally gave in and started learning Haskell. I would still choose Elixir&#x2F;Phoenix for some web apps though.
评论 #19715676 未加载
评论 #19715644 未加载
rossenberg79about 6 years ago
Why is Elixir always being paired with Phoenix? Can’t I just have a backend API running on Elixir and a javascript front end to interact with it? I’d prefer a simple React, Postgres, Elixir stack (REP).
评论 #19715754 未加载
评论 #19715587 未加载
评论 #19715499 未加载
评论 #19717009 未加载
评论 #19718638 未加载
评论 #19718927 未加载
评论 #19717066 未加载
评论 #19716509 未加载
评论 #19719366 未加载
onebotabout 6 years ago
I have just starting learning Elixir and Phoenix. It seems like a solid replacement for Rails. But I keep getting hung up on performance. With React, it seems like you are developing more API back-end, then web server back-end (if that makes sense). But when you look at the performance compared to Go and the steeper learning curve, why not just use Go? Kubernetes really solves the share-nothing let-it-fail aspect. Obviously, Erlang&#x2F;Elixir are hands-down a good fit for fault tolerant distributed systems where performance may not be as critical or you can use NIF. But outside chat and a few other use-cases, not sure the majority of web services falls into this. However, the functional code is so nice. Anyways, any input on how to convince engineering leadership how Elixir might be better than Go would be helpful.
评论 #19716078 未加载
adamnemecekabout 6 years ago
Ok, for backend, I’m deciding between rust with actix, jvm (kotlin + akka&#x2F;quasar) or elixir.<p>I kinda know the theoretical differences but I’m curious what hn thinks. Has someone actually deployed things in some of these.<p>I do have preference towards rust but maybe there’s something better.
评论 #19715230 未加载
评论 #19715173 未加载
评论 #19715309 未加载
评论 #19715010 未加载
AlchemistCampabout 6 years ago
The project I&#x27;ve been working on the past couple of months is a very similar stack to this—Phoenix, Absinthe, Apollo, React, Redux.<p>The main difference is I&#x27;ve been using TypeScript and the Absinthe resolvers are using Dataloader.
评论 #19717501 未加载
sntranabout 6 years ago
It always bugs me that, with Absinthe, you have to define Ecto schema and GraphQL schema separately, when most of the time, they are very similar. Can Absinthe somehow figure out from Ecto?
评论 #19719426 未加载
hestefiskabout 6 years ago
Good read. Curious about Elixir. Why would one use this over ‘plain old’ Erlang &#x2F; OTP apart from the Rubyesque syntax, which might appeal to RoR devs?
评论 #19715338 未加载
评论 #19715701 未加载
评论 #19719401 未加载
评论 #19715344 未加载
评论 #19718682 未加载
评论 #19716708 未加载
macintuxabout 6 years ago
&gt; much friendier syntax for developers<p>This drives me batty. More familiar? Sure. “Friendlier” is very subjective.
评论 #19716189 未加载
yeskiaabout 6 years ago
Loved this deep dive - appreciate you going step by step and explaining each part.
评论 #19715855 未加载
swyxabout 6 years ago
great write up. shall we dub this the PAAGER stack?
评论 #19715431 未加载
sergiotapiaabout 6 years ago
When you get to the absinthe part you lose me. It&#x27;s the same gut feeling I had when I see Redux where it works but it was created at the very beginning of this entire workflow discovery and better tools&#x2F;approaches have since come out.
评论 #19715168 未加载
评论 #19716141 未加载
johnnyjiabout 6 years ago
Nice! This is 1 for 1 the exact tech stack we use at Distru :D