Skip to content

Commit

Permalink
Fix: 400 error on indexer queries
Browse files Browse the repository at this point in the history
Problem: indexer queries fail because of a breaking change. The
blockchain parameter is now a literal string instead of an enum value,
requiring additional quotes.

Solution: add quotes around the blockchain parameter value.
  • Loading branch information
odesenfans committed Oct 3, 2023
1 parent b27ca0c commit f87ea1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aleph/chains/indexer_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def make_account_state_query(
return """
{
state: accountState(
blockchain: %s
blockchain: "%s"
account: %s
type: %s
) {
Expand Down Expand Up @@ -95,7 +95,7 @@ def make_events_query(

fields = "\n".join(model.__fields__.keys())
params: Dict[str, Any] = {
"blockchain": blockchain.value,
"blockchain": f'"{blockchain.value}"',
"limit": limit,
"reverse": "false",
}
Expand Down

0 comments on commit f87ea1e

Please sign in to comment.