Examples of GraphQL Elixir Plug endpoints mounted in Phoenix
Elixir HTML JavaScript
Switch branches/tags
Nothing to show
Clone or download
sudostack and joshprice Update resolver parameter names for clarity (#17)
Communicates more clearly what is passed back to the callback even if they are unused
Latest commit d6357b0 Sep 9, 2016

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