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

Function latestBookmarksQueryOptions

packages/shared/src/graphql/bookmarks.ts:303–319  ·  view source on GitHub ↗
({
  user,
  first,
}: {
  user?: Pick<LoggedUser, 'id'>;
  first: number;
})

Source from the content-addressed store, hash-verified

301
302/** The reader's latest bookmarks, newest first, as the bookmarks page lists them. */
303export 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. */
322export const archivedBookmarksQueryOptions = ({

Callers 1

ReadingListWidgetFunction · 0.90

Calls 2

gqlBatchRequestFunction · 0.90

Tested by

no test coverage detected