A guide teaching how to use Query, Dataloader, Mutation, Subscription and Authentication with GraphQL using Absinthe on Phoenix.
Read the article at:
- GraphQL with Absinthe on Phoenix - Query and Dataloader;
- GraphQL with Absinthe on Phoenix - Mutation;
# clone the project
git clone [email protected]:wbotelhos/graphql-with-absinthe-on-phoenix.git
# access the project
cd graphql-with-absinthe-on-phoenix
# installs the dependencies
mix deps.get
# creates the database
mix ecto.setup
# run the server
mix phx.server
# open the browser
open localhost:4000
Books:
{
books(limit: 2) {
id
name
position
verses(limit: 2) {
id
chapter
number
body
}
}
}
Book:
{
book(id: 1) {
id
name
position
verses(limit: 2) {
id
chapter
number
body
}
}
}