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

Function squadCoverQueryOptions

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

Source from the content-addressed store, hash-verified

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

Callers 1

SquadUpdatesWidgetFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected