stacker.news/api/typeDefs/notifications.js

73 lines
1.1 KiB
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!
}
2023-02-01 14:44:35 +00:00
type Streak {
sortTime: String!
days: Int
id: ID!
}
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-12-19 22:27:52 +00:00
type Referral {
sortTime: String!
}
2022-03-17 20:13:19 +00:00
union Notification = Reply | Votification | Mention
2022-12-19 22:27:52 +00:00
| Invitification | Earn | JobChanged | InvoicePaid | Referral
2023-02-01 14:44:35 +00:00
| Streak
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!]!
}
`