---
url: /nestjs-odata/api/generated/interfaces/ExpandItem.md
---
# Interface: ExpandItem

Defined in: [parser/ast.ts:148](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/parser/ast.ts#L148)

Single $expand item — one navigation property with optional nested query options

## Properties

### count?

> `readonly` `optional` **count?**: `boolean`

Defined in: [parser/ast.ts:157](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/parser/ast.ts#L157)

Nested `$count=true`: annotate the expanded collection with `nav@odata.count`.

***

### countOnly?

> `readonly` `optional` **countOnly?**: `boolean`

Defined in: [parser/ast.ts:169](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/parser/ast.ts#L169)

`$expand=nav/$count`: only `nav@odata.count` is returned, not the related entities. Only
`filter` and `search` may be set alongside it.

***

### expand?

> `readonly` `optional` **expand?**: [`ExpandNode`](ExpandNode.md)

Defined in: [parser/ast.ts:155](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/parser/ast.ts#L155)

***

### filter?

> `readonly` `optional` **filter?**: [`FilterNode`](../type-aliases/FilterNode.md)

Defined in: [parser/ast.ts:150](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/parser/ast.ts#L150)

***

### levels?

> `readonly` `optional` **levels?**: `number` | `"max"`

Defined in: [parser/ast.ts:164](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/parser/ast.ts#L164)

Nested `$levels` (a positive integer or `max`). `ODataQueryPipe` replaces it by the
equivalent nested `$expand`s, so query translators never see it.

***

### navigationProperty

> `readonly` **navigationProperty**: `string`

Defined in: [parser/ast.ts:149](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/parser/ast.ts#L149)

***

### orderBy?

> `readonly` `optional` **orderBy?**: [`OrderByItem`](OrderByItem.md)\[]

Defined in: [parser/ast.ts:152](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/parser/ast.ts#L152)

***

### search?

> `readonly` `optional` **search?**: [`SearchNode`](../type-aliases/SearchNode.md)

Defined in: [parser/ast.ts:159](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/parser/ast.ts#L159)

Nested `$search`: only related entities matching the search are expanded.

***

### select?

> `readonly` `optional` **select?**: [`SelectNode`](SelectNode.md)

Defined in: [parser/ast.ts:151](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/parser/ast.ts#L151)

***

### skip?

> `readonly` `optional` **skip?**: `number`

Defined in: [parser/ast.ts:154](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/parser/ast.ts#L154)

***

### top?

> `readonly` `optional` **top?**: `number`

Defined in: [parser/ast.ts:153](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/parser/ast.ts#L153)
