A lightweight GraphQL client using the fetch API, designed for Node.js and browser environments. Current stable version is 0.3.9, but the package appears to be in early development with no recent releases. It supports file uploads, request aborting, and RxJS Observables. Provides both a class-based `GQLClient` and a functional `getFetch` API. Includes a fetch polyfill for older browsers. Differentiators include built-in file upload support via multipart requests and Observable integration, but compared to mature clients like Apollo Client or urql, it lacks subscriptions, caching, and React integration.
npm install gql-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a GQLClient, sends a query with variables, handles response or error, and demonstrates abort capability.
Consider using actively maintained alternatives like Apollo Client, urql, or graphql-request.
Ensure no duplicate fetch polyfills are loaded; test in target browsers.
Install rxjs separately: npm install rxjs
Use the Blob or File API in browser environment instead of fs.createReadStream.
Use named import: import { GQLClient } from 'gql-fetch'Use ES module import syntax: import { GQLClient } from 'gql-fetch'Install rxjs: npm install rxjs
No dependency data recorded yet.