Closed
Description
In Microsoft Graph SDK v6, the way to get drive items has changed a bit (based on https://github.com/microsoftgraph/msgraph-sdk-java/blob/main/docs/upgrade-to-v6.md#drive-item-paths), and now getting items by userId requires 2 separate requests:
Get drive by userId:
Drive drive = graphClient
.users()
.byUserId(userId)
.drive()
.get();
Get items:
DriveItem = graphClient
.drives()
.byDriveId(drive.getId())
.items()
.byDriveItemId(itemId)
.get();
In Microsoft Graph SDK Java v5, it is possible to get a drive item in one request:
DriveItem driveItem = graphClient
.users(userId)
.drive()
.items(itemId)
.buildRequest()
.get();
2 questions:
- Is it still possible to make only 1 request in the example above using Microsoft Graph SDK v6.
- If there is no way to do that, is it possible to use batch requests for the case above, where the second request will be dependent on the response of the first one?
This is concerning because we will reach throttling 2x faster if we use Microsoft Graph SDK v6.