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.
graphql-lightning-talk/README.md
2018-04-08 12:43:50 +12:00

996 B

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

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