Fumadocs

Order Updated

SUBSCRIPTIONorderUpdated(id: ID!): Order!

Subscribe to status changes of an order.

Arguments

id*ID!

Returns

  1. orderUpdated

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 RequestGraphQL
subscription OrderUpdated($id: ID!) {
  orderUpdated(id: $id) {
    id
    status
    createdAt
    total
    customer {
      id
      name
      contact {
        email
        phone
      }
      orders {
        id
        status
        createdAt
        total
      }
    }
  }
}
Variables
{
  "id": "1"
}
Example Response
{
  "data": {
    "orderUpdated": {
      "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
          }
        ]
      }
    }
  }
}