Microsoft graph api 批处理:使用dependsOn属性对请求进行排序

Microsoft graph api 批处理:使用dependsOn属性对请求进行排序,microsoft-graph-api,microsoft-graph-batch,Microsoft Graph Api,Microsoft Graph Batch,使用dependsOn属性对请求进行排序的文档表明,序列中并非所有调用都需要依赖,但是,在进行以下批处理调用时,我收到错误: BadRequest-批处理应该是完全顺序的或完全并行的 'requests': [ { 'id': '1', 'method': 'GET', 'url': '/me/messages?$top=1'

使用dependsOn属性对请求进行排序的文档表明,序列中并非所有调用都需要依赖,但是,在进行以下批处理调用时,我收到错误:

BadRequest-批处理应该是完全顺序的或完全并行的

           'requests': [
                {
                  'id': '1',
                  'method': 'GET',
                  'url': '/me/messages?$top=1'
                },
                {
                  'id': '2',
                  'dependsOn': [ '1' ],
                  'method': 'GET',
                  'url': '/me/calendar/events?$top=1'
                },
                {
                  'id': '3',
                  'method': 'GET',
                  'url': 'me/contacts?$top=1'
                }
          ]

您还需要将dependsOn添加到“id”:“3”请求中

比如:


在发布这个问题时,我可能应该更清楚一点。我意识到答案是什么,因为错误信息非常清楚,我更想做的是指出微软的文档是不正确的,因为它给出了一个例子,没有“dependsOn”对批处理中的每个项目,甚至说没有它的项目将并行执行。是的,似乎是这样。文档中有一个错误。是的,很遗憾文档不正确。我确实在已知问题中看到,它提到目前仅支持并行或串行:
'requests': [
                {
                  'id': '1',
                  'method': 'GET',
                  'url': '/me/messages?$top=1'
                },
                {
                  'id': '2',
                  'dependsOn': [ '1' ],
                  'method': 'GET',
                  'url': '/me/calendar/events?$top=1'
                },
                {
                  'id': '3',
                  'dependsOn': [ '2' ],
                  'method': 'GET',
                  'url': 'me/contacts?$top=1'
                }
          ]