query IdentityByIndex($index: Int!) {
  identities(where: {index_eq: $index}) {
    index
    name
    account {
      id
    }
  }
}

query IdentityByName($name: String!) {
  identities(where: {name_eq: $name}) {
    index
    name
    account {
      id
    }
  }
}

query IdentityByPubkey($pubkey: String!) {
  identities(where: {account: {id_eq: $pubkey}}) {
    index
    name
    account {
      id
    }
  }
}

query LatestBlock {
  blocks(limit: 1, orderBy: height_DESC) {
    height
  }
}

query GenesisHash {
  blocks(where: {height_eq: 0}) {
    hash
  }
}