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

Defined in: [context/odata-request-context.ts:13](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/context/odata-request-context.ts#L13)

The request an OData operation runs for.

Adapters read it to hand application hooks (for example the TypeORM adapter's row-level
scopes) the Nest `ExecutionContext` and the underlying request object, without the hooks
having to be request-scoped providers.

## Properties

### executionContext?

> `readonly` `optional` **executionContext?**: `ExecutionContext`

Defined in: [context/odata-request-context.ts:18](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/context/odata-request-context.ts#L18)

The Nest execution context of the route being handled. A `$batch` operation runs through
its own route, so this is that route's context (see `getODataBatchPart()`).

***

### request?

> `readonly` `optional` **request?**: `unknown`

Defined in: [context/odata-request-context.ts:20](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/context/odata-request-context.ts#L20)

The platform request object (Express or Fastify request) when the route is HTTP.
