Querying Rewards through graphql now returns empty data

Hello,

When querying for rewards through GraphQL for our particular Stake pool, our node returns an empty list. We simply query like this (replacing address with our BECH32 pool id):

query {
rewards(
where:{ stakePool:{ id:{_eq:“”} }}
)
{
… field selection …
}
}

This used to work perfectly. After the Alonzo upgrade our node returns no data for that particular address. Simply querying without a filter does return quite some data (2500 elements for epoch 288), but our staking pool is not included. Our node is fully synched.

Blockchain explorers such as Cardanoscan.io does show our rewards for epoch 288, although I’m not sure if it’s because they’re running an old version of graph-ql or something underlying.

Anyone have an idea how we can approach this issue? Perhaps it’s related to this: Rewards Recalculated after Hard Fork

We still haven’t solved the problem. An interesting finding:

When doing a rewards aggregate, e.g.:
query { rewards_aggregate( where:{ earnedIn: {number:{_eq:288}} } ) { aggregate{sum{amount}} }}

I get back a total rewards of 12,313,454.403126, while Cardanoscan.io shows 15,188,088.743288: Epochs - Cardanoscan

This quite clearly shows that there’s something fishy going on in our data and/or the GraphQL integration to it - especially coupled with the fact that its 2500 elements returned exactly.

Any ideas?

I discovered that the rewards are not returned because due to a recent change in the Rewards view of Postgres/Hasura, only rewards of type = ‘member’ are included:

In the Cardano Developers Official Telegram chat it was proposed that I look into using PostgREST, since the GraphQL implementation has complexity, performance and feature issues.