Mutations

Mutations

addItemToOrder

Adds an item to the order. If custom fields are defined on the OrderLine entity, a third argument ‘customFields’ will be available.

  • addItemToOrder(productVariantId: ID!, quantity: Int!): Order

removeOrderLine

  • removeOrderLine(orderLineId: ID!): Order

adjustOrderLine

Adjusts an OrderLine. If custom fields are defined on the OrderLine entity, a third argument ‘customFields’ will be available.

  • adjustOrderLine(orderLineId: ID!, quantity: Int): Order

transitionOrderToState

setOrderShippingAddress

setOrderShippingMethod

  • setOrderShippingMethod(shippingMethodId: ID!): Order

addPaymentToOrder

setCustomerForOrder

login

logout

refreshCustomerVerification

Regenerate and send a verification token for a new Customer registration. Only applicable if authOptions.requireVerification is set to true.

registerCustomerAccount

Register a Customer account with the given credentials

updateCustomer

Update an existing Customer

createCustomerAddress

Create a new Customer Address

updateCustomerAddress

Update an existing Address

deleteCustomerAddress

Delete an existing Address

verifyCustomerAccount

Verify a Customer email address with the token sent to that address. Only applicable if authOptions.requireVerification is set to true.

updateCustomerPassword

Update the password of the active Customer

requestUpdateCustomerEmailAddress

Request to update the emailAddress of the active Customer. If authOptions.requireVerification is enabled (as is the default), then the identifierChangeToken will be assigned to the current User and a IdentifierChangeRequestEvent will be raised. This can then be used e.g. by the EmailPlugin to email that verification token to the Customer, which is then used to verify the change of email address.

updateCustomerEmailAddress

Confirm the update of the emailAddress with the provided token, which has been generated by the requestUpdateCustomerEmailAddress mutation.

requestPasswordReset

Requests a password reset email to be sent

resetPassword

Resets a Customer’s password based on the provided token