I have an array of subscriptions :
const partsArray = parts.map(item => this.partsService.deletePart(item.id));
Then I call a forkJoin on subscriptions and delete them all at once :
forkJoin(partsArray).subscribe({
error: (error: ApiError) => {
},
complete: () => {
}
});
The problem is that it could be 10 or 100, so I need to batch them and make a delay every 10.
10 API CALLS
Delay of 500ms
10 API calls
Delay of 500ms
How can I make it with rxjs ?