orderItemCreate
Add a new item to an existing order.
Creates a new order item with specified product, quantity, and pricing information. The item will be added to the order and order totals will be recalculated automatically.
Possible errors:
- ORDER_NOT_FOUND: Order with the specified ID does not exist
- ORDER_ITEM_CREATE_ERROR: Failed to create the order item due to system error
- VALIDATION_ERROR: Input validation failed (invalid product reference, negative quantity, missing required fields)
- FORBIDDEN: Insufficient permissions to modify orders
AUTH: Role=[order.OWNER,order.EDITOR]
orderItemCreate(
orderId: Int!
orderItem: OrderItemCreateInput!
): OrderItem!
Arguments
orderItemCreate.orderId
● Int!
non-null scalar
Unique identifier of the order to add the item to.
Must be a valid order ID that exists in the system.
orderItemCreate.orderItem
● OrderItemCreateInput!
non-null input
Order item creation data including product, quantity, and pricing.
Contains all necessary information to create a new order item including product reference, quantity, and any item-specific configurations.
Type
OrderItem
object
Order item entity for GraphQL federation.
Represents an individual line item within a customer order, containing the item identification and associated product information. Used for managing order fulfillment, inventory tracking, and product references in order processing.