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.

571 B
Raw Blame
import { useFeatureFlag } from '@app/lib/analytics/posthog';
import { enableGraphqlSoup } from '@core/constant/featureFlags';
import { getGraphqlSoupClient } from '@service-storage/graphql-soup';

/**
 * The Soup client, reread when its transport flag resolves. Only the realtime
 * client carries subscriptions, so a stream started on the plain client that
 * serves before then would never deliver.
 */
export function useWorkClient() {
  const transport = useFeatureFlag(enableGraphqlSoup);

  return () => {
    transport();
    return getGraphqlSoupClient();
  };
}