Skip to content

Commit f0105ab

Browse files
authored
Merge pull request #633 from microsoftgraph/feature/upgrade-guide-delta
- adds upgrade guidelines for delta
2 parents 6a51e92 + b791c7b commit f0105ab

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

docs/upgrade-to-v3.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,41 @@ The interface has been simplified to remove the `getRawObject` and `getSerialize
187187
1. Replace any reference to `getRawObject` by `additionalDataManager`.
188188
1. Replace any reference to `getSerializer` by `graphClient.getSerializer` or create a new instance of the serializer.
189189
190+
### Improved delta API
191+
192+
When using [change tracking/delta APIs](https://docs.microsoft.com/graph/delta-query-overview) Microsoft Graph provides two types of links with the response collection:
193+
194+
- A next link whenever there are more change results to iterate through.
195+
- A delta link whenever there are no more change results to iterate through at this instant. This is the link your application should use to get new changes in the future.
196+
197+
This new version improves the Java API provided to developers.
198+
199+
1. Replace any of the following
200+
201+
```Java
202+
graphClient.users().delta("https://mydeltalink").buildRequest().get();
203+
```
204+
205+
by
206+
207+
```Java
208+
graphClient.users().delta().buildRequest().deltaLink("https://mydeltalink").get();
209+
```
210+
211+
1. Replace any of the following
212+
213+
```Java
214+
graphClient.customRequest("mydeltaPathAndQuery").buildRequest().get();
215+
```
216+
217+
by
218+
219+
```Java
220+
graphClient.users().delta().buildRequest().deltaLink("https://mydeltalink").get();
221+
```
222+
223+
> Note: the `DeltaCollectionPage` also offers a `getNextPage` method which simplifies iterating through results and removes the need for consumers to directly handle the next link themselves.
224+
190225
## Upgrade guide for non-breaking improvments
191226
192227
This section lists out other improvements which are not considered as breaking changes. SDK users are strongly encouraged to take advantage of those new improvements to simplify their code.

0 commit comments

Comments
 (0)