stacker.news/fragments/notifications.js
ekzyis 67a0de3ea5
Notifications with nostr info (#368)
* Show zap message and pubkey in notifications

+ show zap request event in invoice view

* enhance ui

---------

Co-authored-by: ekzyis <ek@stacker.news>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-08-08 13:19:31 -05:00

89 lines
1.6 KiB
JavaScript

import { gql } from '@apollo/client'
import { ITEM_FULL_FIELDS } from './items'
import { INVITE_FIELDS } from './invites'
export const HAS_NOTIFICATIONS = gql`{ hasNewNotes }`
export const NOTIFICATIONS = gql`
${ITEM_FULL_FIELDS}
${INVITE_FIELDS}
query Notifications($cursor: String, $inc: String) {
notifications(cursor: $cursor, inc: $inc) {
cursor
lastChecked
notifications {
__typename
... on Mention {
id
sortTime
mention
item {
...ItemFullFields
text
}
}
... on Votification {
id
sortTime
earnedSats
item {
...ItemFullFields
text
}
}
... on Streak {
id
sortTime
days
}
... on Earn {
id
sortTime
earnedSats
sources {
posts
comments
tipPosts
tipComments
}
}
... on Referral {
id
sortTime
}
... on Reply {
id
sortTime
item {
...ItemFullFields
text
}
}
... on Invitification {
id
sortTime
invite {
...InviteFields
}
}
... on JobChanged {
id
sortTime
item {
...ItemFields
}
}
... on InvoicePaid {
id
sortTime
earnedSats
invoice {
id
nostr
}
}
}
}
} `