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