greed

0.2.1 • Public • Published

Greed

A tiny unopinionated 1kb extendable GraphQL client

Travis Codecov branch version downloads Donate MIT License

This library is meant to implement a minimal framework agnostic GraphQL client. It allows you to query and create mutations on the client. Greed can be easily extended by other libraries to provide more functionality.

Install

npm install --save greed

Shape

Greed:: a -> function
Greed({
  url: String,
  token: String,
  plugins: {
    pre: [Function],
    post: [Function]
  }
});

In Practice

It should now look like this:

import Greed from 'greed';
 
var gql = Greed({
  url: 'https://localhost:3000/',
  token: 'someCrazySuperSecretToken',
  plugins: {
    pre: [
      
    ],
    post: [
 
    ]
  }
});
 
gql(`{
  person(personID: 2){
    name
    species{
      name
    }
  }
}`);

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i greed

Weekly Downloads

1

Version

0.2.1

License

MIT

Last publish

Collaborators

  • kennetpostigo