AzDO Queries
Because of the depth limit, the following way to retrieve the hierarchy could be a better appraoch.
If you are doing it on client side, you can follow the same algorithm - but only perform the expanson of folders on-demand (responding to user's click on a folder for expansion to prevent any page-freeze)
Load the Root folders
Lets explicitly load without the children (depth = 0)