Apollo Client persistence library for queued GraphQL mutations and queries using apollo-link-queue. Current version 0.0.23, actively maintained fork of the original SocialAutoTransport package. Provides automatic restore and persistence of queued requests via AsyncStorage, localStorage, or custom wrappers. Includes beforeRestore, onCompleted, and onError hooks. Supports web and React Native. Key differentiator: integrates with apollo-link-queue to handle offline mutations and retry them when online. Requires @apollo/client ^3.2.5.
npm install apollo-link-queue-persistNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes QueueLink with Apollo Client and persists queued mutations to AsyncStorage.
Create a single QueueLink instance and reuse it for both client construction and persistQueue.
npm install @react-native-async-storage/async-storage
Use apollo-link-queue-persist (published by Asolvi) instead of @SocialAutoTransport/apollo-link-queue-persist.
Wrap storage: import { AsyncStorageWrapper } from 'apollo-link-queue-persist' and pass new AsyncStorageWrapper(AsyncStorage) or use the storage directly if supported.Ensure you are using version 0.0.23 or later. Older versions required @SocialAutoTransport/apollo-link-queue.
Use await persistQueue(...) or .then() to ensure restoration completes.
Ensure client is passed to persistQueue and that the ApolloClient has a link that includes the queueLink.
Install apollo-link-queue: npm install apollo-link-queue
Use new AsyncStorageWrapper(AsyncStorage) or import the wrapper from the package.
Install: npm install @react-native-async-storage/async-storage
Pass a QueueLink instance: persistQueue({ queueLink: new QueueLink(), ... })