Source for a talk I gave about GraphQL and Elixir/Phoenix.
This repository has been archived on 2024-06-24. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2018-04-10 18:16:17 +12:00
assets Working face gallery app with server rendered page. 2018-04-08 10:47:22 +12:00
config Use an access token because it avoids the rate limit. 2018-04-10 18:16:17 +12:00
lib Use an access token because it avoids the rate limit. 2018-04-10 18:16:17 +12:00
priv Add face importing from github. 2018-04-08 10:06:11 +12:00
test Add face importing from github. 2018-04-08 10:06:11 +12:00
.gitignore Use an access token because it avoids the rate limit. 2018-04-10 18:16:17 +12:00
go.sh update go.sh 2018-04-10 12:43:15 +12:00
mix.exs Get Absinthe working with list and creating people. 2018-04-08 12:42:50 +12:00
mix.lock Get Absinthe working with list and creating people. 2018-04-08 12:42:50 +12:00
README.md Update readme. 2018-04-09 13:03:58 +12:00

Getting started with Absinthe

Absinthe is an open source implementation of the GraphQL server specification for Elixir. Note that I said "Elixir" there and not "Phoenix". Absinthe doesn't need Phoenix, but we're going to use it in this example because my guess is that not many people are making purely GraphQL services and most of us are probably bolting it on to existing sites or services.

Absinthe has truly amazing docs. Seriously. They're so great. You should check them out.

In this branch we've added Absinthe to our project, and configured a type and a schema for our list of people, and a mutation which can import new people.

Look at:

  • mix.exs
  • lib/faces_web/router.ex
  • lib/faces_web/schema/schema.ex
  • lib/faces_web/schema/person.ex
  • lib/faces_web/resolvers/people.ex

Demo

Next, move on to step-4 to see how to use this from the client-side.