happy-fetch

0.2.0 • Public • Published

happy-fetch

A simple GraphQL request client.

Usage

import HappyFetch from 'happy-fetch'

const graphqlQuery = `{
  users {
    _id
    name
  }
}`

try {
  const happyFetch = new HappyFetch(<API_URL>)

  const response = await happyFetch.query(graphqlQuery)

  // Do stuff with response..
} catch (error) {
  // Handle API errors..
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    1
    • latest

Version History

Package Sidebar

Install

npm i happy-fetch

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • adam.peryman