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

Function sourceMutedAuthorsQueryOptions

packages/shared/src/graphql/squads.ts:1576–1594  ·  view source on GitHub ↗
({
  sourceId,
  user,
}: {
  sourceId?: string;
  user?: Pick<LoggedUser, 'id'>;
})

Source from the content-addressed store, hash-verified

1574`;
1575
1576export const sourceMutedAuthorsQueryOptions = ({
1577 sourceId,
1578 user,
1579}: {
1580 sourceId?: string;
1581 user?: Pick<LoggedUser, 'id'>;
1582}) =>
1583 infiniteQueryOptions({
1584 queryKey: generateQueryKey(RequestKey.SquadMutedAuthors, user, sourceId),
1585 queryFn: ({ pageParam }) =>
1586 gqlClient
1587 .request<{
1588 sourceMutedAuthors: Connection<SourceMutedAuthor>;
1589 }>(SOURCE_MUTED_AUTHORS_QUERY, { sourceId, after: pageParam })
1590 .then((res) => res.sourceMutedAuthors),
1591 initialPageParam: '',
1592 getNextPageParam: (page) => getNextPageParam(page?.pageInfo),
1593 enabled: !!user && !!sourceId,
1594 });

Callers 1

SquadMutedAuthorsListFunction · 0.90

Calls 2

generateQueryKeyFunction · 0.90
getNextPageParamFunction · 0.90

Tested by

no test coverage detected