Home > @vsf-enterprise/commercetools-api > removeFromCart

# removeFromCart() function

Endpoint for removing product from the cart. By default, it uses the updateCartDefaultQuery GraphQL query

Signature:

export declare function removeFromCart(context: Context, cart: RemoveFromCartParams, product: LineItem, customQuery?: CustomQuery): Promise<RemoveFromCartResponse>;

# Parameters

Parameter Type Description
context Context Automatically injected context. Refer to Context
cart RemoveFromCartParams
product LineItem Product information
customQuery CustomQuery Custom queries included in the request

Returns:

Promise<RemoveFromCartResponse>

User cart information