Skip to content

fix(batch): fix sequencing requests json key #996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zhwei
Copy link

@zhwei zhwei commented Aug 7, 2025

Overview

According to this document and real test, the json key is dependsOn

https://learn.microsoft.com/en-us/graph/json-batching?tabs=http#sequencing-requests-with-the-dependson-property

Demo

Optional. Screenshots, curl examples, etc.

Notes

Optional. Ancillary topics, caveats, alternative strategies that didn't work out, anything else.

Testing Instructions

Can be test in Graph Explorer, POST to https://graph.microsoft.com/v1.0/$batch, if use depends_on the reminder will not change.

{
  "requests": [
    {
      "id": "0",
      "method": "PATCH",
      "url": "/me/events/AAkALgAAAAAAHYQDEapmEc2byACqAC-EWg0A2lcW9Zl8mk2NWtdO8T_CbwAHVZHSDgAA",
      "dependsOn": [],
      "headers": {
        "accept": "application/json",
        "content-type": "application/json"
      },
      "body": {
        "isReminderOn": true,
        "reminderMinutesBeforeStart": 0
      }
    },
    {
      "id": "1",
      "method": "POST",
      "url": "/me/events/AAkALgAAAAAAHYQDEapmEc2byACqAC-EWg0A2lcW9Zl8mk2NWtdO8T_CbwAHVZHSDgAA/extensions",
      "dependsOn": [
        "0"
      ],
      "headers": {
        "accept": "application/json",
        "content-type": "application/json"
      },
      "body": {
        "@odata.type": "#microsoft.graph.openTypeExtension",
        "updated_at": "2025-08-07T07:40:41.111442Z",
        "extensionName": "com.example.Sth"
      }
    },
    {
      "id": "2",
      "method": "GET",
      "url": "/me/events/AAkALgAAAAAAHYQDEapmEc2byACqAC-EWg0A2lcW9Zl8mk2NWtdO8T_CbwAHVZHSDgAA",
      "dependsOn": [
        "1"
      ],
      "headers": {
        "prefer": "odata.maxpagesize=1000, IdType=\"ImmutableId\", outlook.timezone=\"Asia/Shanghai\", outlook.body-content-type=\"text\"",
        "accept": "application/json"
      }
    }
  ]
}

@zhwei zhwei requested a review from a team as a code owner August 7, 2025 08:03
Copy link

sonarqubecloud bot commented Aug 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant