0.0.1-2 • Published 7 years ago

graphql-ask v0.0.1-2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

graphql-ask

Minimalistic and isomorphic request sender for GraphQL.

Example

const { ask } = require('graphql-ask')

const url = 'https://api.github.com/graphql'
const query = '{repository(owner:"avajs" name:"ava"){description url updatedAt}}'

ask(url, query, {
	headers: {
		'Authorization': 'Bearer <your GitHub personal access token>'
	}
})
	.then(console.log)
	.catch(console.error)