Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/tasks/PageIterator.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function callingPattern() {
// Creating a new page iterator instance with client a graph client instance, page collection response from request and callback
let pageIterator = new PageIterator(client, response, callback);
// This iterates the collection until the nextLink is drained out.
pageIterator.iterate();
await pageIterator.iterate();
} catch (e) {
throw e;
}
Expand All @@ -44,12 +44,12 @@ async function customSize() {
};
let pageIterator = new PageIterator(client, response, callback);
// This stops iterating over for 1000 entities.
pageIterator.iterate();
await pageIterator.iterate();

// Resuming will do start from where it left off and iterate for next 1000 entities.
// Check and resume is likely to be called in any user interaction requiring to load more data.
if (!pageIterator.isComplete()) {
pageIterator.resume();
await pageIterator.resume();
}
} catch (e) {
throw e;
Expand Down