Skip to main content

favoriteListRemoveItems

Remove products and clusters from a favorite list.

Disassociates individual products and/or product clusters from the specified favorite list, removing them from the user's saved items.

Removal process includes:

  • Validation of all provided product and cluster references
  • Safe removal of specified items from the list
  • Atomic operation ensuring data consistency
  • Preservation of items not specified in the removal request

Items can be specified using either internal IDs or external source references, but not both formats simultaneously. The operation only removes explicitly specified items - all other items in the list remain unchanged.

Non-existent items in the removal request are silently ignored, making the operation safe for bulk removals. The operation is idempotent - removing the same item multiple times has no additional effect.

Supported item types:

  • Products: Individual product entities referenced by ID or external source
  • Clusters: Product cluster entities referenced by ID or external source
  • Mixed: Both products and clusters can be removed in the same operation

Validation constraints:

  • Array fields must contain unique values (duplicates are automatically removed)
  • External source references must have valid name and ID format
  • Items not present in the list are silently ignored

Possible errors:

  • FAVORITE_LISTS_NOT_FOUND_ERROR: Favorite list with the specified ID does not exist
  • FAVORITE_LISTS_INVALID_INPUT_ERROR: Invalid item references or validation failure
  • FAVORITE_LISTS_UNKNOWN_ERROR: Unexpected system error during item removal

AUTH: Role=[system] OR ('user is authenticated')

favoriteListRemoveItems(
id: String!
input: FavoriteListsItemsInput!
): FavoriteList!

Arguments

favoriteListRemoveItems.id ● String! non-null scalar

Unique identifier of the favorite list to modify.

Must be a valid MongoDB ObjectId string with length of 12 or 24 characters representing an existing favorite list. The ObjectId format is validated automatically and will return an error for invalid formats.

Validation constraints:

  • Required field (cannot be null or empty)
  • Must be valid ObjectId format (hexadecimal string)
  • Must reference an existing favorite list in the system

favoriteListRemoveItems.input ● FavoriteListsItemsInput! non-null input

Items to remove from the favorite list.

Contains arrays of product IDs and/or cluster IDs to disassociate from the favorite list. All fields are optional, but at least one item type should be provided for meaningful operation.

Supported formats:

  • productIds: Array of internal product identifiers to remove
  • productSources: Array of external product source references to remove
  • clusterIds: Array of internal cluster identifiers to remove
  • clusterSources: Array of external cluster source references to remove

Validation rules:

  • Cannot mix ID and source formats for the same item type
  • Items not present in the list are silently ignored
  • Duplicate values within arrays are automatically removed
  • Empty arrays are ignored

Type

FavoriteList object

Favorite list entity for GraphQL federation.

Represents a customer's favorite list containing saved products and clusters for easy access and future purchasing. Used for managing customer preferences and providing personalized shopping experiences across federated services.