graffle

Simple GraphQL Client for JavaScript. Minimal. Extensible. Type Safe. Runs everywhere.

MIT License

Downloads
3K
Stars
5.8K
Committers
90

Bot releases are hidden (Show)

graffle - v1.5.1

Published by schickling over 6 years ago

1.5.1 (2018-03-01)

Bug Fixes

  • deps: update dependency cross-fetch to v2.0.0 (dbcec5e)
graffle - v1.5.0

Published by schickling over 6 years ago

1.5.0 (2018-02-23)

Features

graffle - 1.4.0

Published by schickling about 7 years ago

Replaced isomorphic-fetch with cross-fetch. Thanks for the PR #30 @lquixada!

graffle - v1.3.6

Published by timsuchanek about 7 years ago

  • Text errors are now wrapped in an error object to fix the issue described in #23
graffle -

Published by timsuchanek about 7 years ago

  • Fixed error handling for Safari
  • Upgraded Typescript
graffle -

Published by schickling over 7 years ago

  • Allow fetch-compatible options in constructor #9

Example:

import { GraphQLClient } from 'graphql-request'

const client = new GraphQLClient('my-endpoint', {
 credentials: 'include',
 mode: 'cors'
})

const query = `{
  Movie(title: "Inception") {
    releaseDate
    actors {
      name
    }
  }
}`

client.request(query).then(data => console.log(data))