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

Function squadJobQueryOptions

packages/shared/src/graphql/squadJobs.ts:121–136  ·  view source on GitHub ↗
(id?: string)

Source from the content-addressed store, hash-verified

119});
120
121export const squadJobQueryOptions = (id?: string) => ({
122 queryKey: generateQueryKey(RequestKey.Squad, undefined, 'job', id),
123 queryFn: async (): Promise<SquadJob> => {
124 const res = await gqlClient.request<{ squadJob: SquadJob }>(
125 SQUAD_JOB_QUERY,
126 { id },
127 );
128
129 return res.squadJob;
130 },
131 enabled: !!id,
132 // A blip is retried, a removed role stops at once
133 retry: (failureCount: number, error: unknown): boolean =>
134 !isSquadJobGone(error) && failureCount < 2,
135 staleTime: StaleTime.Default,
136});
137
138const ADD_SQUAD_JOB_MUTATION = gql`
139 mutation AddSquadJob($sourceId: ID!, $input: SquadJobInput!) {

Callers 1

SquadJobPageFunction · 0.90

Calls 2

generateQueryKeyFunction · 0.90
isSquadJobGoneFunction · 0.85

Tested by

no test coverage detected