stacker.news/api/typeDefs/notifications.js

55 lines
883 B
JavaScript
Raw Normal View History

2021-08-17 13:15:24 -05:00
import { gql } from 'apollo-server-micro'
export default gql`
extend type Query {
2022-04-21 12:48:27 -05:00
notifications(cursor: String, inc: String): Notifications
2021-08-17 13:15:24 -05:00
}
type Votification {
earnedSats: Int!
item: Item!
2021-08-19 19:13:32 -05:00
sortTime: String!
2021-08-17 13:15:24 -05:00
}
type Reply {
item: Item!
2021-08-19 19:13:32 -05:00
sortTime: String!
2021-08-17 13:15:24 -05:00
}
2021-08-18 18:00:54 -05:00
type Mention {
mention: Boolean!
item: Item!
2021-08-19 19:13:32 -05:00
sortTime: String!
2021-08-18 18:00:54 -05:00
}
2022-01-19 15:02:38 -06:00
type Invitification {
invite: Invite!
sortTime: String!
}
2022-02-28 14:09:21 -06:00
type JobChanged {
item: Item!
sortTime: String!
}
2022-03-17 15:13:19 -05:00
type Earn {
earnedSats: Int!
sortTime: String!
}
2022-03-23 13:54:39 -05:00
type InvoicePaid {
earnedSats: Int!
invoice: Invoice!
sortTime: String!
}
2022-03-17 15:13:19 -05:00
union Notification = Reply | Votification | Mention
2022-04-24 11:13:07 -05:00
| Invitification | Earn | JobChanged | InvoicePaid
2021-08-17 13:15:24 -05:00
type Notifications {
2021-08-19 19:13:32 -05:00
lastChecked: String
2021-08-17 13:15:24 -05:00
cursor: String
notifications: [Notification!]!
}
`