microsoftgraph / microsoftgraph/msgraph-sdk-php

V2 pagination with getValue unclear

Open
#1,491 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs: Attention :wave: question
Dominant language
PHP
Stars
669
Forks
150
Avg merge
15h 21m
Merged PRs (30d)
3

Description

The documentation Get a collection of items mentions paging, but the example and code are not entirely clear here.

The call $messages->getValue() from the example would return a native php array type.

Is that array already filled with all items from all pages? Is that guaranteed? Or do I only get a single page here?


On a side note, it might have been better to return a \Generator that can be iterated over, independent on the page size, that will simply call the next page when it's its turn.

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.

Research direction

Start with the paging section in docs/Examples.md, especially the Get a collection of items example and its $messages->getValue() call. Trace the relevant pagination behavior in the SDK, then document whether getValue() contains one page or all pages and clarify the example; the requested Generator idea is a separate consideration.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.