Home > @vue-storefront/magento-api > removeItemFromCart

removeItemFromCart() function

Removes an item from the given cart

Signature:

export default function removeItemFromCart(context: Context, input: RemoveItemFromCartInput, customQuery?: CustomQuery, customHeaders?: CustomHeaders): Promise<FetchResult<RemoveItemFromCartMutation>>;

Parameters

Parameter Type Description
context Context VSF context
input RemoveItemFromCartInput ID of the cart and item to be removed from it
customQuery CustomQuery (Optional) custom GraphQL query that extends the default one
customHeaders CustomHeaders (Optional) (optional) - custom headers that extends the default headers

Returns:

Promise<FetchResult<RemoveItemFromCartMutation>>