cartCreate
Creates a new cart for customers to add products and proceed to checkout.
Authentication
Public Access: Accessible with the public API key
Mutation Structure
mutation {
cartCreate(input: CartInput!) {
cart {
id
createdAt
updatedAt
}
userErrors {
field
message
}
}
}Input Arguments
Return Type
CartCreatePayload - The payload returned by the cartCreate mutation, containing the newly created cart and any validation errors that occurred during creation.
Example
mutation {
cartCreate(input: {
lines: [
{
quantity: 1
merchandiseId: "12345"
}
]
}) {
cart {
id
createdAt
updatedAt
}
userErrors {
field
message
}
}
}