> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# checkoutTreeCheck

> Check a checkout tree as saving and publishing would, without saving it. For an editor that changes `CheckoutTree.definition` and saves it with `checkoutTreeCreate`.

**Required scopes:** [`checkout_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-checkout_read)

## Arguments

**definition** `[CheckoutTreeDefinitionInput!](/docs/api-reference/v3/reference/checkout/checkout-tree-definition-input)` *required*

The whole tree to check.

**fields**

**edges** `[\[CheckoutTreeEdgeInput!\]!](/docs/api-reference/v3/reference/checkout/checkout-tree-edge-input)` *required*

Its edges. A port leads to at most one step.

**fields**

**from** `String!` *required*

The step it leaves, or `"trigger"` for the start.

**port** `String!` *required*

`next` from the start; `matching`, `nonMatching` or an edge id from a segment; a treatment id (or, before the split is saved, its name) from a split.

**to** `String!` *required*

The step it leads to.

**steps** `[\[CheckoutTreeStepInput!\]!](/docs/api-reference/v3/reference/checkout/checkout-tree-step-input)` *required*

Its steps.

**fields**

**config** `[JSON!](/docs/api-reference/v3/reference/common/json)` *required*

The step's settings, matching `configJsonSchema` on its `steps/<type>` page in `checkoutTreeCatalog`.

**id** `String!` *required*

The step's id, unique in the tree. Keep a saved step's id; a new step may use any word and gets an id when saved.

**title** `String`

A name for the step.

**type** `[CheckoutTreeStepType!](/docs/api-reference/v3/reference/checkout/checkout-tree-step-type)` *required*

What the step does.

## Returns

**checkoutTreeCheck** `[\[CheckoutTreeDiagnostic!\]!](/docs/api-reference/v3/reference/checkout/checkout-tree-diagnostic)` *required*

A problem in a checkout tree.

**fields**

**blocks** `[CheckoutTreeDiagnosticBlocks!](/docs/api-reference/v3/reference/checkout/checkout-tree-diagnostic-blocks)` *required*

What it stops.

**code** `String!` *required*

A stable code, such as CT0105. Read `diagnostics/<code>` in `checkoutTreeCatalog`.

**message** `String!` *required*

What is wrong.

**stepId** `String`

The step it is on; null for the tree as a whole.

## Example

```graphql theme={null}
query {
  checkoutTreeCheck(definition: { ... }) {
    blocks
    code
    message
    stepId
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.