PageIterator: matain the state of previous calls

Open
#981 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
api

Research direction

Start by locating the PageIterator entry point and reviewing how it currently handles results across calls. Determine how an exposed array of all returned objects should behave for infinite-scroll consumers, then verify that repeated iteration preserves prior results and that the public API is documented and tested.

Written by the indexing model from the issue text.

Description

request: feature

Feature Request

Maintain the state of all previous calls in the PageIterator.

Is your feature request related to a problem? Please describe

We are using the PageIterator to create an "Infinite Scroll" capability on our SPA application. Unfortunately, when iterating, we have to maintain the state of previous calls in a separate array.

Describe the solution you'd like

Expose an array of objects with all the results returned by the PageIterator.

Describe alternatives you've considered

We created a wrapper around the PageIterator to save the previous state of all results in an array.

Dominant language
TypeScript
Stars
833
Forks
240
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoftgraph/msgraph-sdk-javascript

All issues in microsoftgraph/msgraph-sdk-javascript

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.