Apollo Link is the standard interface for modifying control flow of GraphQL requests and fetching GraphQL results, designed to provide a simple GraphQL client that is capable of extensions. Version 1.2.14 is stable with no active development; consider using @apollo/client (v3+) which includes links natively. Differentiators: composable chain of middleware, Observable-based, supports subscriptions.
npm install apollo-linkNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a custom Apollo Link that sends GraphQL requests over HTTP using fetch, demonstrating Observable usage.
Migrate to @apollo/client and use ApolloClient with ApolloLink from that package.
Upgrade to @apollo/client which handles this correctly.
Use import syntax: import { ApolloLink } from 'apollo-link'Check if forward exists: if (forward) return forward(operation); else return new Observable(...)
Check if forward is defined before calling: if (forward) return forward(operation);
Run: npm install apollo-link graphql
Use: import { Observable } from 'apollo-link'Use: const { ApolloLink } = require('apollo-link');