({
user,
first,
}: {
user?: Pick<LoggedUser, 'id'>;
first: number;
})
| 301 | |
| 302 | /** The reader's latest bookmarks, newest first, as the bookmarks page lists them. */ |
| 303 | export const latestBookmarksQueryOptions = ({ |
| 304 | user, |
| 305 | first, |
| 306 | }: { |
| 307 | user?: Pick<LoggedUser, 'id'>; |
| 308 | first: number; |
| 309 | }) => ({ |
| 310 | queryKey: [...getLatestBookmarksQueryKey(user), first], |
| 311 | queryFn: () => |
| 312 | gqlBatchRequest<FeedData>(BOOKMARKS_FEED_QUERY, { |
| 313 | loggedIn: true, |
| 314 | first, |
| 315 | sort: BookmarkSort.TimeDesc, |
| 316 | supportedTypes: baseFeedSupportedTypes, |
| 317 | }), |
| 318 | staleTime: StaleTime.OneMinute, |
| 319 | }); |
| 320 | |
| 321 | /** Whether the folder or view keeps any archived bookmark, out of the All list. */ |
| 322 | export const archivedBookmarksQueryOptions = ({ |
no test coverage detected