deleteEventSubscription

Version 2024-04-01

Overview

Delete previously created subscription to stop receiving certain EventType.

Response

Return type DeleteEventSubscriptionResponse

Arguments

ArgumentDescription
subscriptionId (String required)

subscriptionId is a unique identifier associated with a subscription

The size should be greater than or equal to 1 and less than or equal to 50.

Examples


Delete Event Subscription

Request

mutation {
    deleteEventSubscription(
        subscriptionId: "7c391bed-5023-42b7-baf2-bf76db6de5b1"
    ) {
        subscriptionId
    }
}

Response

{
  "data": {
    "deleteEventSubscription": {
      "subscriptionId": "7c391bed-5023-42b7-baf2-bf76db6de5b1"
    }
  }
}

Error Response While Deleting With Wrong Id

Request

mutation {
    deleteEventSubscription(
        subscriptionId: "a4ee62e3-940a-407f-84a2-bdecf3afe77b"
    ) {
        subscriptionId
    }
}

Response

{
  "errors": [
    {
      "message": "You do not have sufficient access to perform this action.",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "deleteEventSubscription"
      ],
      "extensions": {
        "classification": {
          "type": "AccessDeniedError",
          "errorType": "AccessDeniedException",
          "errorCode": 403
        }
      }
    }
  ],
  "data": null
}