List Notices
Get notice based on its index
notice(
noticeIndex: Int!
inputIndex: Int!
): Notice!
Arguments
noticeIndex (Int!)
inputIndex (Int!)
Type
Notice
Informational statement that can be validated in the base layer blockchain.
Example usage
1. Retrieve a detailed notice, including proof, using both the noticeIndex and inputIndex:
query notice($noticeIndex: Int!, $inputIndex: Int!) {
notice(noticeIndex: $noticeIndex, inputIndex: $inputIndex) {
index
input {
index
}
payload
proof {
validity {
inputIndexWithinEpoch
outputIndexWithinInput
outputHashesRootHash
vouchersEpochRootHash
noticesEpochRootHash
machineStateHash
outputHashInOutputHashesSiblings
outputHashesInEpochSiblings
}
context
}
}
}
Here, the query takes two variables: noticeIndex and inputIndex.
{
"noticeIndex": 0,
"inputIndex": 1
}
Get notices with support for pagination
notices(
first: Int
last: Int
after: String
before: String
): NoticeConnection!
Arguments
first (Int)
Get at most the first n entries (forward pagination).
last (Int)
Get at most the last n entries (backward pagination).
after (String)
Get entries that come after the provided cursor (forward pagination).
before (String)
Get entries that come before the provided cursor (backward pagination).
Type
NoticeConnection
Pagination result
Example usage
1. Query all notices:
query notices {
notices {
edges {
node {
index
input {
index
}
payload
}
}
}
}
2. Query notices based on their inputIndex:
query noticesByInput($inputIndex: Int!) {
input(index: $inputIndex) {
notices {
edges {
node {
index
input {
index
}
payload
}
}
}
}
}
{
"inputIndex": 1
}
In this example, the query is set to retrieve all notices at inputIndex 1.