stacker.news/fragments/notifications.js

78 lines
1.5 KiB
JavaScript
Raw Normal View History

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