Skip to Content

CartCreatePayload

Payload returned by the cartCreate mutation. Contains the newly created cart and any errors that occurred during the creation process.

Type Definition

type CartCreatePayload { cart: Cart userErrors: [UserError]! }

Fields

FieldTypeDescription
cartCartThe created cart
userErrors[UserError]!List of errors that occurred during cart creation

Relationships

CartCreatePayload is the return type for the cartCreate mutation. It encapsulates the result of a cart creation operation, including the newly instantiated Cart object (if creation was successful) and any UserError objects that describe validation failures or other issues encountered during the operation.

Example

mutation { cartCreate(input: { lines: [] }) { cart { id checkoutUrl } userErrors { field message } } }

Implements

This type does not implement any interfaces.