pnp / pnpjs

Fluent JavaScript API for SharePoint and Microsoft Graph REST APIs
https://pnp.github.io/pnpjs/
Other
753 stars 305 forks source link

Updated Batching - Support Chunked Batch Size #2957

Closed bcameron1231 closed 5 months ago

bcameron1231 commented 5 months ago

Category

What's in this Pull Request?

Our current implementation of batching supports a maxRequests props, which splits up the batching into chunks based on that maxRequest value specified. However, it does not work. When the count of requests does not equal the maxRequests value, batching will fail to return the promise.

I've updated this, to keep track of indexes on the chunks to properly resolve() the promises we've added to our list of requests. I've removed some additional timeouts and promise returns, in favor of the single promise.all