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

Function squadCoverQueryOptions

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

Source from the content-addressed store, hash-verified

507
508/** The squad's cover, which the reader's own squad list does not carry. */
509export const squadCoverQueryOptions = ({
510 sourceId,
511}: {
512 sourceId?: string;
513}) => ({
514 queryKey: [RequestKey.Squad, null, sourceId, 'cover'],
515 queryFn: async (): Promise<Pick<Squad, 'id' | 'headerImage'>> => {
516 const res = await gqlBatchRequest<{
517 source: Pick<Squad, 'id' | 'headerImage'>;
518 }>(SQUAD_COVER_QUERY, { id: sourceId });
519
520 return res.source;
521 },
522 enabled: !!sourceId,
523 staleTime: StaleTime.OneHour,
524});
525
526export const SIMILAR_SQUADS_QUERY = gql`
527 query SimilarSquads($sourceId: ID!, $limit: Int) {

Callers 1

SquadUpdatesWidgetFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected