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-30 00:13:21 +00:00
|
|
|
rewards(when: [String!]): [Rewards!]
|
|
|
|
meRewards(when: [String!]!): [MeRewards]
|
2022-12-08 00:04:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extend type Mutation {
|
2023-09-24 19:38:37 +00:00
|
|
|
donateToRewards(sats: Int!, hash: String, hmac: String): Int!
|
2022-12-08 00:04:02 +00:00
|
|
|
}
|
|
|
|
|
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!
|
2023-08-29 21:05:09 +00:00
|
|
|
item: Item
|
2023-08-15 17:41:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type MeRewards {
|
|
|
|
total: Int!
|
|
|
|
rewards: [Reward!]
|
|
|
|
}
|
2022-12-08 00:04:02 +00:00
|
|
|
`
|