tubedude / spider

A GraphQL simple client for Elixir.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spider

Is a GraphQL client for Elixir largely dependent ton HTTPoison and Poison.

Installation

If available in Hex, the package can be installed by adding spider to your list of dependencies in mix.exs:

def deps do
  [
    {:spider, "~> 0.1.0"}
  ]
end

Usage

query = """
{
  allCinemaDetails(before: "2017-10-04", after: "2010-01-01") {
    edges {
      node {
        slug
        hallName
      }
    }
  }
}
"""
request = %Spider.request{url:"https://etmdb.com/graphql", query: %{query: query}}
Spider.request(request)
{:ok, %{"allCinameDetails" => {"edges" => [...]}}}

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/spider.

About

A GraphQL simple client for Elixir.


Languages

Language:Elixir 100.0%