Mutation
mutation UpdateWebhookTarget($input: UpdateWebhookTargetInput!) {
updateWebhookTarget(input: $input) {
webhookTarget {
id
url
description
eventSubscriptions {
eventType
}
version
isEnabled
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"webhookTargetId": "id"
}
}Response
{
"data": {
"updateWebhookTarget": {
"webhookTarget": {
"id": "id",
"url": "string",
"description": "string",
"eventSubscriptions": [
{
"eventType": "string"
}
],
"version": "string",
"isEnabled": true
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
updateWebhookTarget
Update an existing webhook target. You can change the URL, pause or resume deliveries via isEnabled, switch to a newer schema version, or change which event types are subscribed to. Scalar fields use a { value: ... } wrapper so you can omit fields you do not want to change; eventSubscriptions is a full replacement of the previous list, so include every event type the target should receive. At least one field must be provided. Requires the webhookTarget:edit permission.
MUTATION
updateWebhookTarget(input: UpdateWebhookTargetInput!): UpdateWebhookTargetOutput!Arguments
input
required
Returns
webhookTarget
error
Mutation
mutation UpdateWebhookTarget($input: UpdateWebhookTargetInput!) {
updateWebhookTarget(input: $input) {
webhookTarget {
id
url
description
eventSubscriptions {
eventType
}
version
isEnabled
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"webhookTargetId": "id"
}
}Response
{
"data": {
"updateWebhookTarget": {
"webhookTarget": {
"id": "id",
"url": "string",
"description": "string",
"eventSubscriptions": [
{
"eventType": "string"
}
],
"version": "string",
"isEnabled": true
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

