# My Orders

## GraphQL partial SDLs

This is a graphql reference page. In the llms.txt variant, those components link to the shared partial SDL key list instead of trying to resolve inline GraphQL reference content.

Fetch all available partial SDL keys first:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-sphere:returnTypesList
```

Then fetch the one or more relevant partial SDL with a key from that list by calling the same endpoint with a schema ID:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-sphere:schema:<key>
```

The response body is a JSON object keyed by the requested content ID. For example, the key-list request returns a `ctp:gql-sphere:returnTypesList` field and a schema request returns a `ctp:gql-sphere:schema:<key>` field.

**Mutations for creating Orders as the authenticated Customer.**

The My Orders mutations return the same [Order](/api/graphql/orders.md#order) output type as the [Orders](/api/graphql/orders.md) mutations. To query Orders of the authenticated Customer, use the `order` and `orders` fields on the `me` field. These return [Order](/api/graphql/orders.md#order) and [OrderQueryResult](/api/graphql/orders.md#order-query-result).

The GraphQL API doesn't provide an update mutation for My Orders.

## Queries

The queries for My Orders are the `order` and `orders` fields on the `me` field. They are the same as the queries documented on the [Orders](/api/graphql/orders.md#queries) page ([Query Orders](/api/graphql/orders.md#query-orders) and [Get Order](/api/graphql/orders.md#get-order)), but return only Orders of the authenticated Customer.

## Mutations

### Create My Order from Cart

[fetch SDL for mutation createMyOrderFromCart](#graphql-partial-sdls).

### Create My Order from Quote

[fetch SDL for mutation createMyOrderFromQuote](#graphql-partial-sdls).

## Output types

The My Orders queries and mutations return the [Order](/api/graphql/orders.md#order) and [OrderQueryResult](/api/graphql/orders.md#order-query-result) types.

## Input types

### OrderMyCartCommand

[fetch SDL for type OrderMyCartCommand](#graphql-partial-sdls).

### OrderMyQuoteCommand

[fetch SDL for type OrderMyQuoteCommand](#graphql-partial-sdls).

## Related pages

- [Area overview page with navigation](/api.md)
- [Previous page: REST](/api/projects/me-orders.md)
- [Search documentation and API specs](/search.md)