Examples of GraphQL Elixir Plug endpoints mounted in Phoenix
Elixir HTML JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
lib
priv
test
web Update resolver parameter names for clarity (#17) Sep 9, 2016
.gitignore
.travis.yml
LICENSE
README.md
brunch-config.js
elixir_buildpack.config
mix.exs
mix.lock
package.json

README.md

GraphQL Phoenix Examples

Build Status Public Slack Discussion

This is a Phoenix app containing examples of how to use plug_graphql which in turn uses the GraphQL Elixir Core

Installation

Clone this repo and start your Phoenix app:

  1. Install dependencies with mix deps.get
  2. Create your development database using mix ecto.create. NOTE: you may need to edit config/dev.exs to set up your database configuration if it is not configured for passwordless logins on localhost.
  3. Setup your DB for the Ecto example with mix ecto.migrate and mix run priv/repo/seeds.exs
  4. Start Phoenix endpoint with mix phoenix.server

Now you can visit localhost:4000 from your browser.

Examples

Using plug_graphql with Phoenix is very simple.

Simply mount your GraphQL endpoint like so:

  1. Define your schema in web/graphql (see https://github.com/graphql-elixir/hello_graphql_phoenix/tree/master/web/graphql)
  2. Mount your endpoint

Resources