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-08 12:42:50 +12:00
assets Working face gallery app with server rendered page. 2018-04-08 10:47:22 +12:00
config Fix timestamps to always create as :utc_datetime. 2018-04-08 12:25:31 +12:00
lib Get Absinthe working with list and creating people. 2018-04-08 12:42:50 +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 Empty Phoenix application. 2018-04-08 09:20:53 +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 Get Absinthe working with list and creating people. 2018-04-08 12:42:50 +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 now "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 migration 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