stacker.news/fragments/notifications.js

47 lines
899 B
JavaScript
Raw Normal View History

import { gql } from '@apollo/client'
2021-08-17 13:15:24 -05:00
import { ITEM_FIELDS } from './items'
2022-01-19 15:02:38 -06:00
import { INVITE_FIELDS } from './invites'
2021-08-17 13:15:24 -05:00
export const NOTIFICATIONS = gql`
${ITEM_FIELDS}
2022-01-19 15:02:38 -06:00
${INVITE_FIELDS}
2021-08-17 13:15:24 -05:00
query Notifications($cursor: String) {
notifications(cursor: $cursor) {
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 {
2021-08-19 19:13:32 -05:00
sortTime
2021-08-18 18:00:54 -05:00
mention
item {
...ItemFields
text
}
}
2021-08-17 13:15:24 -05:00
... on Votification {
2021-08-19 19:13:32 -05:00
sortTime
2021-08-17 13:15:24 -05:00
earnedSats
item {
...ItemFields
text
}
}
... on Reply {
2021-08-19 19:13:32 -05:00
sortTime
2021-08-17 13:15:24 -05:00
item {
...ItemFields
text
}
}
2022-01-19 15:02:38 -06:00
... on Invitification {
sortTime
invite {
...InviteFields
}
}
2021-08-17 13:15:24 -05:00
}
}
} `