1.0.3 • Published 8 years ago

graphqlfetcher v1.0.3

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

graphql-fetch

Fetch for GraphQL requests

This function helps you to do http requests for API written in GraphQL.

Returns GraphQL response (JSON).

If errors occurred then field named errors is present.

Based on isomorphic-fetch

#Usage:

import fabric from 'graphqlfetcher'
const fetch = fabric('http://som_url/graphql');

fetch(`
  query Q($input: GraphQLInputObject){
    someQuery(input:$input) {field}
  }`,
  {
    input: {
      var1: 'value1'
    }
  },
  //provide headers if needed
  {
    headers: {
      Authorization: 'Bearer some_token'
    }
  }
  
1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago