Messages
The messages field allows us to retrieve detaild information about messages from Cosmos blockchain.
Here is an example that demonstrates retrieving message from Cosmos hub:
{
cosmos {
messages(
date: {after: "2023-08-07"}
options: {desc: "block.timestamp.iso8601", limit: 10}
) {
block {
height
timestamp {
iso8601
}
}
index
json
senders
transaction {
hash
signer {
address
}
}
}
}
}
Filtering Messages
any: a catch-all filter (OR logic) that can be used to fetch the results by any of the other fieldsblockHash: filter by block hashblockHeight: filter by block heightdate: filter by date on which transaction was createdindex: filter by index of message in transactionoptions: filter returned data by ordering, limiting and constraining itsenders: filter by message sendersuccess: filter by success of transactiontransactionHash: filter by transaction hashtransactionIndex: filter by index of transaction in blocktransactionSigner: filter by transaction signertype: filter by type of the message
any: a catch-all field can be used to fetch the results by any of the other fieldsblock: returns information of block where transaction is includedcount: returns count and other metricscountBigInt: returns count and other metrics as BigIntdate: return date on which transaction is createdexpression: performs arithematic operation on fields in the query and returns value of the operationindex: returns index of message in transactionjson: returns body of messagemaximum: returns maximum for selected measurable field of Cosmos messageminimum: returns minimum for selected measurable field of Cosmos messagesenders: returns message sender(s)success: returns success of transaction as booleantransaction: returns transaction formation where message is includedtype: returns type of message