Fumadocs

Legacy Create Order

Deprecated

Use createOrder instead.

MUTATIONlegacyCreateOrder(customerId: ID!): Order

Arguments

customerId*ID!

Returns

  1. legacyCreateOrder

A customer's order.

id*ID!
status*OrderStatus!

The status of an order.

Value inPENDINGDELIVEREDREFUNDED
createdAt*DateTime!

Time at which the order was created.

total*Float!
customer*

A registered customer.

Example Request
mutation LegacyCreateOrder($customerId: ID!) {
  legacyCreateOrder(customerId: $customerId) {
    id
    status
    createdAt
    total
    customer {
      id
      name
      contact {
        email
        phone
      }
      orders {
        id
        status
        createdAt
        total
      }
    }
  }
}
Variables
{
  "customerId": "1"
}
Example Response
{
  "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
          }
        ]
      }
    }
  }
}