To start your Phoenix server:
- Install dependencies with
mix deps.get
- Create and migrate your database with
mix ecto.create && mix ecto.migrate
- Start Phoenix endpoint with
mix phx.server
Now you can visit localhost:4000
from your browser.
Seed (dummy) data:
mix run priv/repo/seeds.exs
Now you can visit http://localhost:4000/graphiql from your browser.
Run the following GraphQL Query:
{
blogPosts {
title,
id
}
}
See: https://seanclayton.me/post/phoenix-1-3-and-graphql-with-absinthe/