apollo-state-sync - API Reference (Users)
    Preparing search index...

    Type Alias CacheSyncerConfigType

    Configuration options for synchronizing cache operations across different browsing contexts (e.g., tabs, windows).

    Index
    shouldBroadcastSubscriptionWrites?: boolean

    Determines whether cache operations triggered by GraphQL subscriptions should be broadcast for synchronization.

    By default, this is false because WebSocket connections typically notify other browsing contexts directly about subscription updates.

    Warning: Setting this to true can cause infinite back-and-forth broadcasts loops between browsing contexts. To prevent this, define a custom filter using CacheSyncerConfigType.skipBroadcastFilter and CacheSyncerConfigType.skipPersistFilter.

    false
    
    • apollo-shared-ws for deduplicating GraphQL subscription channels across browsing contexts.
    • File://assets/reactive-vars-and-sub-writes.png | Architecture Diagram for why reactive variables updated by subscriptions are broadcast only while the debounce timer runs.
    skipBroadcastFilter?: ShouldSkipFilter

    Callback to prevent specific operations from being broadcast to other browsing contexts.

    true if the operation should not be broadcast; otherwise, false.

    skipListenedFilter?: ShouldSkipFilter

    Callback to ignore incoming operations broadcast by other browsing contexts.

    true if the incoming operation should be ignored and dropped; otherwise, false.

    skipPersistFilter?: ShouldSkipFilter

    Callback to prevent specific cache operations from being persisted to local storage.

    true if the operation should not be persisted; otherwise, false.