ryanswapp

ryanswapp

I wrote up a little tutorial on setting up a GraphQL server in Phoenix with Absinthe. Here is a link https://ryanswapp.com/2016/11/29/phoenix-graphql-tutorial-with-absinthe/

This is a starting point that I plan to build on. I’ll hopefully have a post up explaining how I’ve done authentication with Absinthe and maybe move into channels and the frontend. Absinthe is great! If you haven’t given it a shot I recommend checking it out :slight_smile:

Showing Posts 1 to 10

jeffdeville

jeffdeville

Thanks Ryan! Added to my reading list.

Oxyrus

Oxyrus

I can’t keep on with the amount of resources people are publishing these days haha, thanks for the post Ryan, definitely looking forward to the rest.

pesnk

pesnk

Forget the rest. just keep the graphql =P

Oxyrus

Oxyrus

It’s still a technology I’m interested in, however I’ve just get into the development of APIs so I don’t see when should I use GraphQL at the moment, but anyway, knowledge is always welcome :smile:

ryanswapp

ryanswapp OP

GraphQL could be considered a replacement for a REST API (or you could have both). REST API’s aren’t bad but they do have some shortcomings (forces you to make multiple calls to the server, returns more data than you need, etc…). GraphQL improves on some of those shortcomings and IMO makes developing an API significantly easier. It’s important to understand REST as it’s a very common API pattern but I think GraphQL is a better alternative.

So, to answer your question, unless you have a hard requirement for a REST API you could skip it altogether and just build a GraphQL API. It is a complete replacement.

Oxyrus

Oxyrus

In the rest APIs you get for instance a json response with some data, and then I can consume it with a front-end technology such as Angular, do I need to include extra packages on the front-end to make a request to a GraphQL API? Or it works with standard HTTP?

ryanswapp

ryanswapp OP

GraphQL also returns a json response. You will likely want to use a client library to send the GraphQL requests though (similar to how you’d use a HTTP client library). There are a few libraries out there at this point to help make sending requests easier (although it’s easy by itself since you just send a string representing your query). You could use Lokka, Apollo, and others. Lokka is pretty basic and is useful for sending queries. Apollo is more full featured and does caching, etc… Just search for GraphQL clients in whatever frontend tech you use and there’s likely to be quite a few.

Oxyrus

Oxyrus

Just finished trying it, great tutorial as always Ryan, looking forward for one about authentication :slight_smile:

petecorey

petecorey

Good stuff!

ryanswapp

ryanswapp OP

I went to your blog to check out the meteor/phoenix auth post and realized you just wrote a very similar post! haha guess it doesn’t hurt to have lots of info out there.

Where Next? Top

Trending in Discussions Top

sntran
In my third year of college, around 2010, I found Erlang. A few years later, I found Elixir. I liked the ideas at once: many small proces...
New
SyntaxSorcerer
This is the start of my Elixir learning journal/journey. I plan to share my journey in this thread and am open to all feedback, construct...
New
bartblast
This is where the projects in the Hologram Showcase get posted: apps built with Hologram and libraries made for it. New ones go up usuall...
New
karolina.curiosum
Hi everyone! This is our fourth edition. Last year, 1,000+ developers took part. The more of you who answer, the more useful the results...
New
budgie
Never used it. I know it’s well-liked by some and the authors have put a lot of work into it. Aside from that, is there a community cons...
New
mandar1045
I’ve been fixing race condition / crash bugs in an open source org, for a few months now and almost all of them had the same problem. The...
New
fredwu
Over the years I’ve tried dozens of time tracking and invoicing apps, and Harvest was the only one I liked. Primarily due to its relative...
New

Other Trending Topics Top

achempion
Youtube announcement I’m also wondering why it’s an one time buy rather than a subscription. I assume project maintenance isn’t free and...
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
261 13183 112
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
charlenopires
Hi everyone :waving_hand: I’ve been working on PhiaUI, an open-source UI component library for Phoenix LiveView, and I wanted to share i...
New
PJUllrich
On November 23, 2026, an unauthorized third party exploited a vulnerability in hex.pm (CVE-2026-129514, CVSS 10.0) that let them run comm...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews