diff --git a/src/persistCacheSync.ts b/src/persistCacheSync.ts index 3a7f229c..120fe303 100644 --- a/src/persistCacheSync.ts +++ b/src/persistCacheSync.ts @@ -3,11 +3,20 @@ import CachePersistor from './CachePersistor'; import Persistor, { PersistorConfig } from './Persistor'; import Storage from './Storage'; -export default (options: ApolloPersistOptions) => { +/** + * Add cache to persist engine using synchronous API + * + * @see SynchronousCachePersistor for advanced use cases + * @param options options for persist engine + */ +export const persistCacheSync = (options: ApolloPersistOptions) => { const cachePersistor = new SynchronousCachePersistor(options); cachePersistor.restoreSync(); }; +/** + * Persistor engine that is going to use synchronous api + */ export class SynchronousCachePersistor extends CachePersistor { persistor: SynchronousPersistor;