stacker.news/fragments/notifications.js

132 lines
2.4 KiB
JavaScript
Raw Normal View History

import { gql } from '@apollo/client'
2023-02-03 18:08:08 -06:00
import { ITEM_FULL_FIELDS } from './items'
2022-01-19 15:02:38 -06:00
import { INVITE_FIELDS } from './invites'
2024-01-02 20:05:49 -06:00
import { SUB_FIELDS } from './subs'
2021-08-17 13:15:24 -05:00
export const HAS_NOTIFICATIONS = gql`{ hasNewNotes }`
2021-08-17 13:15:24 -05:00
export const NOTIFICATIONS = gql`
2023-02-03 18:08:08 -06:00
${ITEM_FULL_FIELDS}
2022-01-19 15:02:38 -06:00
${INVITE_FIELDS}
2024-01-02 20:05:49 -06:00
${SUB_FIELDS}
2021-08-17 13:15:24 -05:00
2022-04-21 12:48:27 -05:00
query Notifications($cursor: String, $inc: String) {
notifications(cursor: $cursor, inc: $inc) {
2021-08-17 13:15:24 -05:00
cursor
2021-08-19 19:13:32 -05:00
lastChecked
2021-08-17 13:15:24 -05:00
notifications {
__typename
2021-08-18 18:00:54 -05:00
... on Mention {
id
2021-08-19 19:13:32 -05:00
sortTime
2021-08-18 18:00:54 -05:00
mention
item {
2023-02-03 18:08:08 -06:00
...ItemFullFields
2021-08-18 18:00:54 -05:00
text
}
}
2021-08-17 13:15:24 -05:00
... on Votification {
id
2021-08-19 19:13:32 -05:00
sortTime
2021-08-17 13:15:24 -05:00
earnedSats
item {
2023-02-03 18:08:08 -06:00
...ItemFullFields
2021-08-17 13:15:24 -05:00
text
}
}
2023-11-21 17:32:22 -06:00
... on Revenue {
id
sortTime
earnedSats
subName
}
... on ForwardedVotification {
id
sortTime
earnedSats
item {
...ItemFullFields
text
}
}
2023-02-01 08:44:35 -06:00
... on Streak {
id
sortTime
days
}
2022-07-05 15:18:59 -05:00
... on Earn {
id
2022-07-05 15:18:59 -05:00
sortTime
2023-08-29 19:13:21 -05:00
minSortTime
2022-07-05 15:18:59 -05:00
earnedSats
sources {
posts
comments
tipPosts
tipComments
}
2022-07-05 15:18:59 -05:00
}
2022-12-19 16:27:52 -06:00
... on Referral {
id
2022-12-19 16:27:52 -06:00
sortTime
}
2021-08-17 13:15:24 -05:00
... on Reply {
id
2021-08-19 19:13:32 -05:00
sortTime
2021-08-17 13:15:24 -05:00
item {
2023-02-03 18:08:08 -06:00
...ItemFullFields
2021-08-17 13:15:24 -05:00
text
}
}
... on FollowActivity {
id
sortTime
item {
...ItemFullFields
text
}
}
... on TerritoryPost {
id
sortTime
item {
...ItemFullFields
text
}
}
2022-01-19 15:02:38 -06:00
... on Invitification {
id
2022-01-19 15:02:38 -06:00
sortTime
invite {
...InviteFields
}
}
2022-02-28 14:09:21 -06:00
... on JobChanged {
id
2022-02-28 14:09:21 -06:00
sortTime
item {
...ItemFields
}
}
2024-01-02 20:05:49 -06:00
... on SubStatus {
id
sortTime
sub {
...SubFields
}
}
2022-03-23 13:54:39 -05:00
... on InvoicePaid {
id
2022-03-23 13:54:39 -05:00
sortTime
earnedSats
invoice {
id
nostr
comment
lud18Data
2022-03-23 13:54:39 -05:00
}
}
2021-08-17 13:15:24 -05:00
}
}
} `