stacker.news/api/typeDefs/rewards.js

32 lines
522 B
JavaScript
Raw Normal View History

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 {
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!]!
leaderboard: UsersNullable
2022-12-08 00:04:02 +00:00
}
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
`