A GraphQL client for Elixir
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Initial commit May 28, 2017
logo chore(logo): Add project logo May 25, 2018
test feat(response): return a meaningful error when response is not JSON (#27 Dec 25, 2018
.formatter.exs style(elixir): Use elixir 1.6 formatter Feb 27, 2018
.gitignore Initial commit May 28, 2017
CHANGELOG.md chore(version): Bump to v1.1.0 Dec 25, 2018
LICENSE.md Initial commit May 28, 2017
README.md chore(version): Bump to v1.1.0 Dec 25, 2018
mix.lock chore(version): Bump to v0.9.0 Sep 8, 2018



Build Status Hex Version

A GraphQL client for Elixir.



def deps do
  [{:neuron, "~> 1.1.0"}]


iex> Neuron.Config.set(url: "https://example.com/graph")

iex> Neuron.query("""
        films {

# Response will be:

{:ok, %Neuron.Response{body: %{"data" => {"films" => { "count": 123 }}}%, status_code: 200, headers: []}}

# You can also run mutations

iex> Neuron.query("""
      mutation createUser($name: String!) {
        createUser(name: $name) {
    %{name: "uesteibar"}

More extensive documentation can be found at https://hexdocs.pm/neuron.

Running locally

Clone the repository

git clone git@github.com:uesteibar/neuron.git

Install dependencies

cd neuron
mix deps.get

To run the tests

mix test

To run the lint

mix credo


Pull requests are always welcome =)

The project uses standard-changelog to update the Changelog with each commit message and upgrade the package version. For that reason every contribution should have a title and body that follows the conventional commits standard conventions (e.g. feat(connection): Make it smarter than Jarvis).

To make this process easier, you can do the following:

Install commitizen and cz-conventional-changelog globally

npm i -g commitizen cz-conventional-changelog

Save cz-conventional-changelog as default

echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc

Instead of git commit, you can now run

git cz

and follow the instructions to generate the commit message.