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

Function archivedBookmarksQueryOptions

packages/shared/src/graphql/bookmarks.ts:322–344  ·  view source on GitHub ↗
({
  user,
  listId,
  reminderOnly = false,
}: {
  user?: Pick<LoggedUser, 'id'>;
  listId?: string;
  reminderOnly?: boolean;
})

Source from the content-addressed store, hash-verified

320
321/** Whether the folder or view keeps any archived bookmark, out of the All list. */
322export const archivedBookmarksQueryOptions = ({
323 user,
324 listId,
325 reminderOnly = false,
326}: {
327 user?: Pick<LoggedUser, 'id'>;
328 listId?: string;
329 reminderOnly?: boolean;
330}) => ({
331 queryKey: generateQueryKey(RequestKey.Bookmarks, user, 'archived', {
332 listId: listId ?? null,
333 reminderOnly,
334 }),
335 queryFn: () =>
336 gqlBatchRequest<FeedData>(BOOKMARKS_FEED_QUERY, {
337 loggedIn: true,
338 first: 1,
339 ...(listId && { listId }),
340 reminderOnly,
341 status: BookmarkStatus.Archived,
342 supportedTypes: baseFeedSupportedTypes,
343 }),
344});

Callers 2

BookmarkFeedLayoutFunction · 0.90
BookmarksPage.tsxFile · 0.90

Calls 2

generateQueryKeyFunction · 0.90
gqlBatchRequestFunction · 0.90

Tested by

no test coverage detected