In the latest preview version of the Microsoft 365 Developer Proxy, we are introducing the preview ability to fail and detect minimal permissions in batch requests, as well as improving the $select guidance to help you build more performant applications.
Download Microsoft 365 Developer Proxy v0.10 and check if your apps properly handle API errors.
Batching support
Batching enables developers to combine several requests into a single batch request to send to Microsoft Graph API. This can save significant network latency and optimize application performance.
In this version, we have added support for batch requests to the minimal permissions and random error plugins for Microsoft Graph.
Let’s consider the batch request below. This request will return the current users profile, emails and calendar events in a single request.
When using the recording mode to record proxy activity, each endpoint used in batch requests is now displayed in the summary output along with the minimal permissions needed.
Microsoft 365 Developer Proxy displaying the minimal required permissions for a batch request
If any of the requests in the batch are failed by the Developer Proxy, a 424 (Failed Dependency) status code response is now returned.
Microsoft 365 Developer Proxy displaying the result of a failed batch request
Improved $select guidance
Previously, we introduced support for showing guidance when the $select system query option is not used on requests to Microsoft Graph endpoints.
This guidance recommends that you use $select to limit the properties returned by request, to those only needed by your app. Limiting the properties returned will reduce network load and help improve your app’s performance.
Our original approach applied this guidance globally to all endpoints. However, not all endpoints in Microsoft Graph API support the use of the $select system query option.
Unfortunately, this led to some false positives being generated by the Developer Proxy.
In this version, we have improved the Microsoft Graph $select guidance plugin by using information from the Microsoft Graph Open API specification.
The Developer Proxy will now only return guidance for requests made to endpoints that support the $select system query option.
What’s next
Further support for batching
While we have made improvements to support batching in this release, we will continue our work to further improve batching support in the Developer Proxy by adding support for batching to the Retry-After and Rate Limiting plugins.
Try it now
Download Microsoft 365 Developer Proxy v0.10 and check if your apps properly handle API errors.
We’re excited about this new version and can’t wait for you to try it out. We look forward to hearing from you about these improvements and how we can continue to make the Microsoft 365 Developer Proxy even better.
Follow us on Twitter @Microsoft365Dev to stay up to date on the latest developer news and announcements.
Happy coding!
0 comments