(id?: string)
| 119 | }); |
| 120 | |
| 121 | export 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 | |
| 138 | const ADD_SQUAD_JOB_MUTATION = gql` |
| 139 | mutation AddSquadJob($sourceId: ID!, $input: SquadJobInput!) { |
no test coverage detected