Skip to main content

List Reports

Get report based on its index

report(
reportIndex: Int!
inputIndex: Int!
): Report!

Arguments

reportIndex (Int!)

inputIndex (Int!)

Type

Report

Application log or diagnostic information.

Example usage

1. Query a report with its reportIndex and inputIndex:

query report($reportIndex: Int!, $inputIndex: Int!) {
report(reportIndex: $reportIndex, inputIndex: $inputIndex) {
index
input {
index
}
payload
}
}
{
"reportIndex": 1,
"inputIndex": 2
}

In this example, the query is set to retrieve the report at reportIndex 1 and inputIndex 2.

Get reports with support for pagination

reports(
first: Int
last: Int
after: String
before: String
): ReportConnection!

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

ReportConnection

Pagination result

Example usage

1. Query all reports:

query reports {
reports {
edges {
node {
index
input {
index
}
payload
}
}
}
}

2. Query reports based on their inputIndex:

query reportsByInput($inputIndex: Int!) {
input(index: $inputIndex) {
reports {
edges {
node {
index
input {
index
}
payload
}
}
}
}
}
{
"inputIndex": 2
}

In this example, the query is set to retrieve all reports at inputIndex 2.

© 2024 Cartesi Foundation Ltd. All rights reserved.

The Cartesi Project is commissioned by the Cartesi Foundation.

We use cookies to ensure that we give you the best experience on our website. By using the website, you agree to the use of cookies.