- handleDelete() called
- Calls: deleteItems(itemIds, 'MoveToDeletedItems', ...)
- Validates permissions
- Checks retention policies
- Shows confirmation if needed
- Dispatches: deleteItemsWithoutConfirmDialog()
- Creates action message
- Broadcasts to all registered orchestrators
- Optimistic UI: deleteItemsStoreUpdate()
- Call GraphQL: invokeDeleteItemMutation()
- Setup undo action
- Handle response/errors
- Formats data for Apollo
- Calls: mutate(DeleteItemDocument, variables)
- Manages GraphQL request
- Routes to registered resolver
- Applies middleware (caching, queuing)
- Receives GraphQL args
- Extracts: itemIds, disposalType, mailboxInfo
- Calls: deleteItemService()
- Transforms response to GraphQL format
deleteItemService.ts::deleteItemService()
- Builds EWS request structure
- Configures: ItemIds, DeleteType, options
- Calls: deleteItemOperation()
- Calls: makeServiceRequest('DeleteItem', req)
- Constructs URL: service.svc?action=DeleteItem
- Adds headers (auth, canary, tenant)
- Makes HTTP POST with fetch()
- Processes delete request
- Moves item to Deleted Items or soft deletes
- Returns success/error response
by Garry