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

Function notificationsQueryOptions

packages/shared/src/graphql/notifications.ts:101–115  ·  view source on GitHub ↗
({
  enabled = true,
}: { enabled?: boolean } = {})

Source from the content-addressed store, hash-verified

99
100/** The reader's notifications, as the notifications page pages them. */
101export const notificationsQueryOptions = ({
102 enabled = true,
103}: { enabled?: boolean } = {}) =>
104 infiniteQueryOptions({
105 queryKey: ['notifications'],
106 queryFn: ({ pageParam }) =>
107 gqlClient.request<NotificationsData>(NOTIFICATIONS_QUERY, {
108 first: 100,
109 after: pageParam,
110 }),
111 initialPageParam: '',
112 getNextPageParam: ({ notifications }) =>
113 getNextPageParam(notifications?.pageInfo),
114 enabled,
115 });
116
117/** Push subscribers already got the squad subscription, so it is hidden. */
118export const isNotificationVisible = (

Callers 1

NotificationsFeedFunction · 0.90

Calls 1

getNextPageParamFunction · 0.90

Tested by

no test coverage detected