Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

JSON Parse error in bookkeeping query #309

Open
simonerom opened this issue Nov 30, 2020 · 3 comments
Open

JSON Parse error in bookkeeping query #309

simonerom opened this issue Nov 30, 2020 · 3 comments

Comments

@simonerom
Copy link
Member

simonerom commented Nov 30, 2020

Querying bookkeeping data at https://analytics.iotexscan.io stopped working:

{ 
  delegate(startEpoch:13512, epochCount:528, delegateName:"iotexlab") {   
    bookkeeping(percentage:90,includeFoundationBonus:false) { 
      rewardDistribution { 
        voterEthAddress,amount 
      } 
    } 
  } 
}

gives the following error, regardless of the epoch count:

{
  "error": "JSON Parse error: Unrecognized token '<'"
}
@simonerom
Copy link
Member Author

@CoderZhi

@CoderZhi
Copy link
Contributor

CoderZhi commented Dec 8, 2020

Synced offline, problem resolved. There are two issues in this query:

  1. rewardDistribution needs an explicit parameter "pagination"
  2. "voterEthAddress,amount" should be in two lines without comma

@CoderZhi CoderZhi closed this as completed Dec 8, 2020
@simonerom
Copy link
Member Author

Reopening this issue again as it seems it's not working again even with "syntax-fixed" code:

query 
{ 
  delegate(startEpoch:13512, epochCount:528, delegateName:"iotexlab") {   
    bookkeeping(percentage:90,includeFoundationBonus:false) {
      exist
      rewardDistribution(pagination: {first: 250, skip: 0}) { 
        voterEthAddress
        amount 
      } 
    } 
  } 
}

while it worked yesterday, it's giving the JSON Parse error again now

@simonerom simonerom reopened this Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants