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

Function notificationsQueryOptions

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

Source from the content-addressed store, hash-verified

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

Callers 1

NotificationsFeedFunction · 0.90

Calls 1

getNextPageParamFunction · 0.90

Tested by

no test coverage detected