MCPcopy Create free account
hub / github.com/dailydotdev/apps / squadAgentAnalyticsQueryOptions

Function squadAgentAnalyticsQueryOptions

packages/shared/src/graphql/squads.ts:1013–1030  ·  view source on GitHub ↗
({
  sourceId,
}: {
  sourceId?: string;
})

Source from the content-addressed store, hash-verified

1011};
1012
1013export const squadAgentAnalyticsQueryOptions = ({
1014 sourceId,
1015}: {
1016 sourceId?: string;
1017}) => {
1018 return {
1019 queryKey: [RequestKey.SquadAgentAnalytics, sourceId],
1020 queryFn: async () => {
1021 const result = await gqlClient.request<{
1022 squadAnalytics: SquadAgentAnalytics | null;
1023 }>(SQUAD_AGENT_ANALYTICS_QUERY, { sourceId });
1024
1025 return result.squadAnalytics;
1026 },
1027 enabled: !!sourceId,
1028 staleTime: StaleTime.Default,
1029 };
1030};
1031
1032export const squadAgentAnalyticsHistoryQueryOptions = ({
1033 sourceId,

Callers 1

SquadManageAnalyticsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected