Skip to content

Commit

Permalink
feature: allow rewards query
Browse files Browse the repository at this point in the history
This is to enable remote clients to fetch rewards information
  • Loading branch information
rhyslbw committed Apr 1, 2021
1 parent 1c1fae5 commit 30b0c68
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/features/rewards/api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Present to be included in the list of allowed queries.
22 changes: 22 additions & 0 deletions source/features/rewards/api/getRewardsForAddresses.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
query getRewardsForAddresses (
$addresses: [StakeAddress!]!
$limit: Int
$offset: Int
$order_by: [Reward_order_by!]
) {
rewards(
limit: $limit
offset: $offset
order_by: $order_by
where: { address: { _in: $addresses }}
) {
address
amount
earnedIn {
number
}
stakePool {
id
}
}
}

0 comments on commit 30b0c68

Please sign in to comment.