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

Function squadAnalyticsHistoryQueryOptions

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

Source from the content-addressed store, hash-verified

1001};
1002
1003export const squadAnalyticsHistoryQueryOptions = ({
1004 sourceId,
1005}: {
1006 sourceId?: string;
1007}) => {
1008 return {
1009 queryKey: [RequestKey.SquadAnalyticsHistory, sourceId],
1010 queryFn: async () => {
1011 const result = await gqlClient.request<{
1012 squadAnalyticsHistory: SquadAnalyticsHistoryNode[];
1013 }>(SQUAD_ANALYTICS_HISTORY_QUERY, { sourceId });
1014
1015 return result.squadAnalyticsHistory;
1016 },
1017 enabled: !!sourceId,
1018 staleTime: StaleTime.Default,
1019 };
1020};
1021
1022export const squadAgentAnalyticsQueryOptions = ({
1023 sourceId,

Callers 2

seedFunction · 0.90
useSquadAnalyticsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected