Thin GraphQL client powered by fetch.
Installation
npm i --save graphql-fetch
Usage
var fetch = 'http://domain.com/graphql' var query = ` query q (id: String!) { user(id: $id) { id, email, name } }`var queryVars = id: 'abcdef'var opts = // custom fetch options /** * @param * @param * @param */
Notes
- Uses isomorphic-fetch under the hood, which makes
fetch
,Headers
,Request
, andResponse
globally available.
License
MIT