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

Function squadCoverQueryOptions

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

Source from the content-addressed store, hash-verified

495
496/** The squad's cover, which the reader's own squad list does not carry. */
497export const squadCoverQueryOptions = ({
498 sourceId,
499}: {
500 sourceId?: string;
501}) => ({
502 queryKey: [RequestKey.Squad, null, sourceId, 'cover'],
503 queryFn: async (): Promise<Pick<Squad, 'id' | 'headerImage'>> => {
504 const res = await gqlBatchRequest<{
505 source: Pick<Squad, 'id' | 'headerImage'>;
506 }>(SQUAD_COVER_QUERY, { id: sourceId });
507
508 return res.source;
509 },
510 enabled: !!sourceId,
511 staleTime: StaleTime.OneHour,
512});
513
514export const SIMILAR_SQUADS_QUERY = gql`
515 query SimilarSquads($sourceId: ID!, $limit: Int) {

Callers 1

SquadUpdatesWidgetFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected