Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paging / Pagination request #62

Closed
warrenmcquinn opened this issue Jan 31, 2018 · 8 comments
Closed

Paging / Pagination request #62

warrenmcquinn opened this issue Jan 31, 2018 · 8 comments

Comments

@warrenmcquinn
Copy link

Hey there,

Thanks for open-sourcing this library!

It'd be great if someone updated the Readme to address pagination.

For example, accessing a user's contacts with an MS Graph query to /contacts returns 10 results per page by default. It's possible to add a $top query parameter to increase that page size.

However, it should definitely be mentioned that the result["@odata.nextLink"] URL (returned with the query response) needs to be queried in order to get the rest of the user's contacts (as well as all additional result["@odata.nextLink"]s!).

I know it's basic pagination 101, but this library's documentation should really include an overview of paging.

@MIchaelMainer
Copy link
Contributor

Thank you @warrenmcquinn. I agree that we should have documentation on paging. 2123467

@mahpour
Copy link

mahpour commented Mar 2, 2018

How is the @OData.nextLink going to be self-consumed by this library to get the next batch of items?

@MIchaelMainer
Copy link
Contributor

@mahpour You'll use the @OData.nextlink value as the url to make the next call to get the next page of results.

@mahpour
Copy link

mahpour commented Mar 5, 2018

I understand that, but aren’t we using this JavaScript library to not deal with http requests directly? It doesn’t make sense to make some of the calls using Microsoft client and some via direct http methods...

@MIchaelMainer
Copy link
Contributor

Yes, I agree with you. It hasn't been implemented yet.

@aslanovsergey
Copy link

Would be nice to have it

@kriede
Copy link

kriede commented Mar 28, 2018

👍 +1 for implementing this

@muthurathinam
Copy link
Contributor

Fixed in this release: https://github.com/microsoftgraph/msgraph-sdk-javascript/releases/tag/1.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants