A lightweight, minimalistic implementation of fetch specifically designed for GraphQL requests from the Apollo ecosystem. Version 0.7.0 (latest), not actively maintained—superseded by Apollo Client's built-in HTTP link. Provides a simple fetch-based interface for executing GraphQL queries and mutations. Unlike full Apollo Client, it offers no caching, state management, or React integration; purely a network layer. Ships TypeScript declarations. Low release cadence, no updates since 2018.
npm install apollo-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an ApolloFetch instance and sends a simple GraphQL query using a URI from environment.
Migrate to @apollo/client and use createHttpLink.
Use Apollo Client for full subscription support.
Install cross-fetch: npm install cross-fetch and add at top: require('cross-fetch/polyfill')Check your network and graphql endpoint, handle errors properly: fetch({query}).then(({data, errors}) => { if (errors) console.error(errors); })