When I try to execute this mutation in my code, I get the following error:
Mutation:
const query = `mutation create_notification($userId: ID!, $targetId: ID!, $text: String!, $targetType: NotificationTargetType!) {
create_notification(user_id: $userId, target_id: $targetId, text: $text, target_type: $targetType) {
text
}
}`;
targetType = "Post",
userId = 12345678,
targetId = 2456768,
text = "<b>test notification</b>"
const variables = { userId, targetId, text, targetType };
const response = await this.mondayClient.execute(query, variables);
Error
{
"text": {
"errors": [
{
"message": "Unauthorized field or type",
"path": [
"create_notification"
],
"extensions": {
"code": "UNAUTHORIZED_FIELD_OR_TYPE"
}
}
],
"account_id": 12345678
}
}
cc: @dipro