GraphQL is a query language created by Facebook in 2012 to provide a common interface between clients and servers by defining their data capabilities and requirements. In our work at CargoSense, we’ve both found it to be a transformative technology choice for building general purpose APIs to support devices in the field and third-party developers.
Elixir forms the core of our backend infrastructure, so we knew from the beginning that we’d need to build a GraphQL implementation for the language. The Absinthe package, available on Hex, is the product of these efforts. Its goal is full implementation of the specification--in as idiomatic, flexible, and comfortable way possible to Elixir developers.
In this talk, we’ll walk you through how to build a GraphQL API on top of Phoenix and Absinthe from the bottom-up. We’ll give you the background you need to know about GraphQL’s underlying concepts and provide some of the real world, production insights we’ve gained. Finally we’ll look at Phoenix channels with GraphQL subscriptions, demoing how GraphQL’s concepts extend beyond the traditional request response cycle.