(categoryId: string)
| 614 | `; |
| 615 | |
| 616 | export const squadCategoryPreviewQueryOptions = (categoryId: string) => ({ |
| 617 | queryKey: generateQueryKey( |
| 618 | RequestKey.Source, |
| 619 | undefined, |
| 620 | 'category-preview', |
| 621 | categoryId, |
| 622 | ), |
| 623 | queryFn: async (): Promise<Pick<Squad, 'id' | 'name' | 'image'>[]> => { |
| 624 | const res = await gqlBatchRequest<{ |
| 625 | sources: Connection<Pick<Squad, 'id' | 'name' | 'image'>>; |
| 626 | }>(SQUAD_CATEGORY_PREVIEW_QUERY, { categoryId, first: 3 }); |
| 627 | |
| 628 | return res.sources.edges.map(({ node }) => node); |
| 629 | }, |
| 630 | staleTime: StaleTime.OneHour, |
| 631 | }); |
| 632 | |
| 633 | export const SQUAD_ANALYTICS_QUERY = gql` |
| 634 | query SquadAnalytics($sourceId: ID!) { |
no test coverage detected