32 lines
522 B
JavaScript
Raw Normal View History

import { gql } from 'graphql-tag'
2022-12-07 18:04:02 -06:00
export default gql`
extend type Query {
2023-08-29 19:13:21 -05:00
rewards(when: [String!]): [Rewards!]
meRewards(when: [String!]!): [MeRewards]
2022-12-07 18:04:02 -06:00
}
extend type Mutation {
donateToRewards(sats: Int!, hash: String, hmac: String): Int!
2022-12-07 18:04:02 -06:00
}
2023-08-15 12:41:51 -05:00
type Rewards {
2022-12-07 18:04:02 -06:00
total: Int!
2023-08-15 12:41:51 -05:00
time: Date!
2022-12-07 18:04:02 -06:00
sources: [NameValue!]!
leaderboard: UsersNullable
2022-12-07 18:04:02 -06:00
}
2023-08-15 12:41:51 -05:00
type Reward {
type: String
rank: Int
sats: Int!
2023-08-29 16:05:09 -05:00
item: Item
2023-08-15 12:41:51 -05:00
}
type MeRewards {
total: Int!
rewards: [Reward!]
}
2022-12-07 18:04:02 -06:00
`