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

Function sourceMutedAuthorsQueryOptions

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

Source from the content-addressed store, hash-verified

1593`;
1594
1595export const sourceMutedAuthorsQueryOptions = ({
1596 sourceId,
1597 user,
1598}: {
1599 sourceId?: string;
1600 user?: Pick<LoggedUser, 'id'>;
1601}) =>
1602 infiniteQueryOptions({
1603 queryKey: generateQueryKey(RequestKey.SquadMutedAuthors, user, sourceId),
1604 queryFn: ({ pageParam }) =>
1605 gqlClient
1606 .request<{
1607 sourceMutedAuthors: Connection<SourceMutedAuthor>;
1608 }>(SOURCE_MUTED_AUTHORS_QUERY, { sourceId, after: pageParam })
1609 .then((res) => res.sourceMutedAuthors),
1610 initialPageParam: '',
1611 getNextPageParam: (page) => getNextPageParam(page?.pageInfo),
1612 enabled: !!user && !!sourceId,
1613 });

Callers 1

SquadMutedAuthorsListFunction · 0.90

Calls 2

generateQueryKeyFunction · 0.90
getNextPageParamFunction · 0.90

Tested by

no test coverage detected