SimpleGraphqlClient - an Elixir graphql client

SimpleGraphqlClient - As the name implies it’s a simple GraphQL client :slight_smile: It allows you to interact with graphql Api as simple as possible without any trouble.

But you may ask, why i wrote it even if there is a plenty of others clients.
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.

hex.pm: simple_graphql_client
github: https://github.com/gen1321/simple_graphql_client

Feedback and contributions are appreciated!

8 Likes

v0.2.0

  • Now it’s a zero config lib
  • ADD SUPPORT FOR ABSINTHE SUBSCRIPTIONS :slight_smile:
  • Opts is now a keyword list
  • Support down to elixir 1.3
5 Likes

Have you tried https://github.com/uesteibar/neuron ?

Sure thing. I it have very different api back in a day. this why i wrote this lib

1 Like

I completely understand. My point is more about have you get a problem with Neuron. I’ve been using this lib a while and works very well with a small code

def graphql_request(token) do
    Neuron.Config.set(url: "https://HOST/graphql")
    Neuron.Config.set(headers: ["Authorization": token])

    Neuron.query("""
      {
        person {
          id
        }
      }
    """)
  end

Anyway, always it’s worth there are more option and your library is very straightforward