> Documentation index: [Saleor](/llms.txt) · [This section](/api-reference/orders/llms.txt)
> Source: https://docs.saleor.io/api-reference/orders/queries/draft-orders

# draftOrders Query

List of draft orders. The query will not initiate any external requests, including filtering available shipping methods, or performing external tax calculations.

Requires the MANAGE\_ORDERS permission.

```graphql
draftOrders(
  sortBy: OrderSortingInput
  filter: OrderDraftFilterInput
  where: DraftOrderWhereInput
  search: String
  before: String
  after: String
  first: Int
  last: Int
): OrderCountableConnection
```

Details

```graphql
type OrderCountableConnection {
  pageInfo: PageInfo!
  edges: [OrderCountableEdge!]!
  totalCount: Int
}
```

<a id="arguments"></a>

### Arguments

<a id="sort-by"></a>

#### [`sortBy`](#sort-by) ● [`OrderSortingInput`](/api-reference/orders/inputs/order-sorting-input.md)

Sort draft orders.

<a id="where"></a>

#### [`where`](#where) ● [`DraftOrderWhereInput`](/api-reference/orders/inputs/draft-order-where-input.md)

Where filtering options for draft orders.

Added in Saleor 3.22

<a id="search"></a>

#### [`search`](#search) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Search orders.

Added in Saleor 3.22

<a id="before"></a>

#### [`before`](#before) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Return the elements in the list that come before the specified cursor.

<a id="after"></a>

#### [`after`](#after) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Return the elements in the list that come after the specified cursor.

<a id="first"></a>

#### [`first`](#first) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

<a id="last"></a>

#### [`last`](#last) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

Show deprecatedHide deprecated

<a id="filter"></a>

#### [`filter`](#filter) ● [`OrderDraftFilterInput`](/api-reference/orders/inputs/order-draft-filter-input.md)

DEPRECATED

Use `where` filter instead.

Filtering options for draft orders.

<a id="type"></a>

### Type

<a id="ordercountableconnection"></a>

#### [`OrderCountableConnection`](/api-reference/orders/objects/order-countable-connection.md)
