All Projects → gen1321 → simple_graphql_client

gen1321 / simple_graphql_client

Licence: MIT license
SimpleGraphqlClient is a graphql client, focused on simplicity and ease of use.

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to simple graphql client

pokedex
📕 DIY full-stack workshop teaching you Elixir, Absinthe GraphQL, React and Relay
Stars: ✭ 17 (+0%)
Mutual labels:  absinthe, absinthe-graphql
Neuron
A GraphQL client for Elixir
Stars: ✭ 244 (+1335.29%)
Mutual labels:  graphql-client, hex
apollo-tracing-elixir
Apollo Tracing middleware for Absinthe
Stars: ✭ 114 (+570.59%)
Mutual labels:  absinthe, absinthe-graphql
ProceduralHexTerrainGenerator
Procedural Hex Terrain Generator
Stars: ✭ 20 (+17.65%)
Mutual labels:  hex
buffertools-php
Toolbox for working with binary and hex data. Similar to NodeJS Buffer.
Stars: ✭ 60 (+252.94%)
Mutual labels:  hex
agala
Full featured messaging bot framework.
Stars: ✭ 70 (+311.76%)
Mutual labels:  hex
fullstack-graphql-angular
Simple Fullstack GraphQL Application with Angular CLI + Redux. API built with Typescript + Express + GraphQL + Sequelize (supports MySQL, Postgres, Sqlite and MSSQL). WebApp built with Angular CLI + Redux + Async Middleware to access the API.
Stars: ✭ 67 (+294.12%)
Mutual labels:  graphql-client
ghql
GraphQL R client
Stars: ✭ 128 (+652.94%)
Mutual labels:  graphql-client
gleam compile
Tiny hex package to make the development experience of using gleam in elixir (and especially phoenix projects) better.
Stars: ✭ 29 (+70.59%)
Mutual labels:  hex
soyuz
Real-time streaming GraphQL client for the web.
Stars: ✭ 57 (+235.29%)
Mutual labels:  graphql-client
apollo-link-segment
Automatic analytics for Apollo Apps.
Stars: ✭ 18 (+5.88%)
Mutual labels:  graphql-client
hexagonTab
Hexagon bookmarks accented with a chosen colour. Customise the layout, style, background and bookmarks with hexagonTab.
Stars: ✭ 65 (+282.35%)
Mutual labels:  hex
hex-to-css-filter
Easy way to generate colors from HEX to CSS Filters
Stars: ✭ 20 (+17.65%)
Mutual labels:  hex
ColorMinePortable
ColorMinePortable
Stars: ✭ 37 (+117.65%)
Mutual labels:  hex
HexPatternView
Create Beautiful hex design View.
Stars: ✭ 44 (+158.82%)
Mutual labels:  hex
SAHB.GraphQLClient
Query HTTP api using GraphQL. The client recieves a model as typeparameter and then queries the GraphQL api and deserilize the result.
Stars: ✭ 38 (+123.53%)
Mutual labels:  graphql-client
ex spirit
No description or website provided.
Stars: ✭ 26 (+52.94%)
Mutual labels:  elixir-library
watermelon-http-client
GitHub Action to perform HTTP requests. Supports GraphQL!
Stars: ✭ 21 (+23.53%)
Mutual labels:  graphql-client
graphmath
An Elixir library for performing 2D and 3D mathematics.
Stars: ✭ 72 (+323.53%)
Mutual labels:  hex
color
A library of well-tested helper methods for working with colors.
Stars: ✭ 13 (-23.53%)
Mutual labels:  hex

SimpleGraphqlClient

Simple Graphql client for elixir!

Why

Q: There is a lot of others GraphQL clients for elixir, why creating another one.

A: Because some of them wants you to interpolate variables directly into your query string, and IMHO that is not best approach, some of them are too complicated for just pick them up. And some of them extremely cool like Maple but do not fit into general usage.

Usage

Query/Mutation example

iex>
query = "query users($name: String){users(name: $name){name}}"
SimpleGraphqlClient.graphql_request(query, %{name: "Boris"})
# Will produce
{:ok,
%SimpleGraphqlClient.Response{
  body: {:ok, %{"data" => %{"users" => []}}},
  headers: [],
  status_code: 200
  }
}

Subscription example

sub_query = "
  subscription testsub {
    userAdded{
      email
    }
  }
"
SimpleGraphqlClient.absinthe_subscribe(sub_query, %{}, &IO.inputs/1)

# Will produce 
%{"userAdded" => %{"email" => "[email protected]"}}

More examples

You can find more examples in test_app/test/graphql folder

Configuration

For configuration i suggest to write your own wrappers of &graphql_request/3 or any subscribe function. If you want to pass Authorization parametrs to WS connection, please encode them into url.

Installation

def deps do
  [
    {:simple_graphql_client, "~> 0.2.0"}
  ]
end

Roadmap

  • Add support for subscribtion(50% done, absinthe subscriptions already here)
  • Better Dialyzer
  • CI/Test coverege

PRs are WELCOME

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].