---
title: ChainRule type | Wartiva GraphQL API
description: Represents an individual rule within an nftables chain. Rules define conditions and actions to be performed on network packets.
url: https://wartiva.com/api-docs/types/chain-rule.html
updated: 2026-10-07
---

Endpoint configuration · GraphQL type

# `ChainRule` type

Represents an individual rule within an nftables chain. Rules define conditions and actions to be performed on network packets.

## Fields

| Field Name | Description |
|---|---|
| `position` - [`Uint64!`](https://wartiva.com/api-docs/types/uint64.html) | The numerical position of the rule within its chain. Rules are evaluated in ascending order of position. |
| `handle` - [`Uint64!`](https://wartiva.com/api-docs/types/uint64.html) | A unique identifier for this rule, assigned by the kernel. |
| `expressions` - [`[Expression!]`](https://wartiva.com/api-docs/types/expression.html) | A list of expressions that define the conditions and actions of this rule. Expressions are evaluated from left to right. |
| `userData` - [`Binary`](https://wartiva.com/api-docs/types/binary.html) | Optional arbitrary user data associated with the rule. |

## Used by

- [`Chain`](https://wartiva.com/api-docs/types/chain.html) type: Represents an nftables chain, which is a named list of rules that are executed in order.

## Example

### Example

```json
{
  "position": "8589934592",
  "handle": "8589934592",
  "expressions": [Expression],
  "userData": Binary
}

```

---

Wartiva is in early access. Request access: https://wartiva.com/early-access.html  
All pages: https://wartiva.com/llms.txt
