({
sourceId,
user,
}: {
sourceId?: string;
user?: Pick<LoggedUser, 'id'>;
})
| 1574 | `; |
| 1575 | |
| 1576 | export 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 | }); |
no test coverage detected