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