stacker.news/api/typeDefs/notifications.js

62 lines
984 B
JavaScript
Raw Normal View History

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