---
title: SocketExpression type | Wartiva GraphQL API
description: SocketExpression represents an nftables expression for querying information about the socket associated with a packet, if one exists.
url: https://wartiva.com/api-docs/types/socket-expression.html
updated: 2026-10-07
---

Endpoint configuration · GraphQL type

# `SocketExpression` type

SocketExpression represents an nftables expression for querying information about the socket associated with a packet, if one exists. This is useful for making decisions based on application-layer state or configuration.

## Fields

| Field Name | Description |
|---|---|
| `key` - [`NftSocketKey!`](https://wartiva.com/api-docs/types/nft-socket-key.html) | The key specifying which socket attribute to query. |
| `level` - [`Uint32!`](https://wartiva.com/api-docs/types/uint32.html) | The socket level for which to retrieve information only valid with cgroupsv2 key. |
| `register` - [`NftRegister!`](https://wartiva.com/api-docs/types/nft-register.html) | The register where the retrieved socket information will be stored. |

## Used by

- [`ChainExpression`](https://wartiva.com/api-docs/types/chain-expression.html) union: A union of all possible nftables chain expression types.

## Example

### Example

```json
{
  "key": "TRANSPARENT",
  "level": "1073741824",
  "register": "VERDICT"
}

```

---

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