# Legacy Create Order

Deprecated: Use `createOrder` instead.

```graphql
type Mutation {
  legacyCreateOrder(customerId: ID!): Order
}
```

## Arguments

- `customerId` (`ID!`, required)

## Returns

`Order`: A customer's order.

## Types

```graphql
"A customer's order."
type Order implements Node @auth(requires: USER) {
  id: ID!
  status: OrderStatus!
  "Time at which the order was created."
  createdAt: DateTime!
  total: Float!
  customer: Customer!
}
```

## Example

```graphql
mutation LegacyCreateOrder($customerId: ID!) {
  legacyCreateOrder(customerId: $customerId) {
    id
    status
    createdAt
    total
    customer {
      id
      name
      contact {
        email
        phone
      }
      orders {
        id
        status
        createdAt
        total
      }
    }
  }
}
```

Variables:

```json
{
  "customerId": "1"
}
```

Response:

```json
{
  "data": {
    "legacyCreateOrder": {
      "id": "1",
      "status": "PENDING",
      "createdAt": "<DateTime>",
      "total": 10.5,
      "customer": {
        "id": "1",
        "name": "string",
        "contact": {
          "email": "string",
          "phone": "string"
        },
        "orders": [
          {
            "id": "1",
            "status": "PENDING",
            "createdAt": "<DateTime>",
            "total": 10.5
          }
        ]
      }
    }
  }
}
```
