An Apollo Link that queues GraphQL requests when a condition is met, such as offline mode, and replays them when reconnected. Version 3.1.0 is the current stable release, last updated in 2019. Key differentiator: integrates with Apollo Link chain to buffer requests without custom middleware. Compared to alternatives like apollo-link-retry, it focuses on queueing rather than retrying failed requests.
npm install apollo-link-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to instantiate QueueLink, open/close the gate, and integrate with Apollo Link chain for offline queueing.
Use `import QueueLink from 'apollo-link-queue'` instead of `import { QueueLink } from 'apollo-link-queue'`.Consider migrating to apollo-link-retry for retry logic or apollo-cache-persist for offline persistence.
Add window.addEventListener('offline', () => queueLink.close()) and window.addEventListener('online', () => queueLink.open()).Use a persistence library like apollo-cache-persist to save queued operations before page unload.
Use `queueLink.close()` and `queueLink.open()` directly instead of passing callbacks to constructor.
Change to default import: `import QueueLink from 'apollo-link-queue'`.
Run `npm install apollo-link-queue` or check package.json for the correct dependency name.
Ensure you are using `new QueueLink()` and upgrade to version 3.x.
Add an HttpLink or another terminating link after QueueLink in the chain.