2023-07-23 15:08:43 +00:00
|
|
|
import { gql } from 'graphql-tag'
|
2022-12-08 00:04:02 +00:00
|
|
|
|
|
|
|
export default gql`
|
|
|
|
extend type Query {
|
2023-08-15 17:41:51 +00:00
|
|
|
rewards(when: String): Rewards!
|
|
|
|
meRewards(when: String!): MeRewards
|
2022-12-08 00:04:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extend type Mutation {
|
|
|
|
donateToRewards(sats: Int!): Int!
|
|
|
|
}
|
|
|
|
|
2023-08-15 17:41:51 +00:00
|
|
|
type Rewards {
|
2022-12-08 00:04:02 +00:00
|
|
|
total: Int!
|
2023-08-15 17:41:51 +00:00
|
|
|
time: Date!
|
2022-12-08 00:04:02 +00:00
|
|
|
sources: [NameValue!]!
|
|
|
|
}
|
2023-08-15 17:41:51 +00:00
|
|
|
|
|
|
|
type Reward {
|
|
|
|
type: String
|
|
|
|
rank: Int
|
|
|
|
sats: Int!
|
|
|
|
}
|
|
|
|
|
|
|
|
type MeRewards {
|
|
|
|
total: Int!
|
|
|
|
rewards: [Reward!]
|
|
|
|
}
|
2022-12-08 00:04:02 +00:00
|
|
|
`
|