Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

406 B
Raw Blame
import { createReconnectEffect } from '@macro-inc/collaboration/websocket';
import { ws } from '@service-connection/websocket';
import { queryClient } from './client';

export function useInvalidateQueriesOnReconnect(): void {
  createReconnectEffect(ws, () => {
    // Marks cached queries as stale and automatically refetches active queries in the background
    queryClient.invalidateQueries();
  });
}