{"repo":"gucheen/fetchql","free":true,"listed":false,"github":"https://github.com/gucheen/fetchql","clone":"git clone https://github.com/gucheen/fetchql.git","description":"GraphQL client with Fetch","language":"JavaScript","stars":180,"topics":["graphql","fetch","javascript"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"FetchQL is a query client for GraphQL server works on both browser and Node(need fetch support, eg. node-fetch) New in v3.0.0 New TypeScript declaration file(.tsd). #9 Upgrade to 2.2.0 Now FetchQL distributes an ES module( ./lib/fetchql.es.js ) by default and you can simply import FetchQL by import fetchql from 'fetchql' . For details, please refer to PR: Added support for ES modules by default. Breaking Changes(since v2.0.0) - Source code has been moved into ./src and distributed file goes to ./lib ; - Distributed file( ./lib/fetchql.js ) is unminified now. Pros: lightweight wrap query methods easily set server-side get enum types by names (with cache) built-in interceptors request state callbacks written in ES2015 and modules Usage FetchQL distributes both ES module and CommonJS module Import FetchQL: - import FetchQL from 'fetchql' - const FetchQL = require('fetchql') ES module support is determined by your bundler tool(webpack, rollup, etc.). Documentation Class FetchQL var Query = new FetchQL({ url, interceptors, headers, onStart, onEnd, omitEmptyVariables }) interceptor interceptors is an optional parameter of the class. It can be an Array or an Object. - FetchQL.addInterceptors(interceptor[] interceptor) = function Add more interceptors. Arguments are same with interceptors of class. It will return a function to remove added interceptors . - FetchQL.clearInterceptors() = void Remove all interceptors. FetchQL.query() Query.query({operationName: '', query: '', variables:","default_branch":null,"files":null,"tree":[],"storefront":"/r/gucheen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gucheen/fetchql/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}