Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add doc category to voucherCodeBulkDelete mutation (#14535)

SzymJcff241afc8d7
diff --git a/saleor/graphql/discount/mutations/voucher/voucher_code_bulk_delete.py b/saleor/graphql/discount/mutations/voucher/voucher_code_bulk_delete.py
index 5005614152..3795aa3e18 100644
--- a/saleor/graphql/discount/mutations/voucher/voucher_code_bulk_delete.py
+++ b/saleor/graphql/discount/mutations/voucher/voucher_code_bulk_delete.py
@@ -5,6 +5,7 @@ from .....discount import models
from .....permission.enums import DiscountPermissions
from .....webhook.event_types import WebhookEventAsyncType
from ....core.descriptions import ADDED_IN_318
+from ....core.doc_category import DOC_CATEGORY_DISCOUNTS
from ....core.enums import VoucherCodeBulkDeleteErrorCode
from ....core.mutations import BaseMutation
from ....core.types import NonNullList, VoucherCodeBulkDeleteError
@@ -37,6 +38,7 @@ class VoucherCodeBulkDelete(BaseMutation):
description="A voucher was updated.",
)
]
+ doc_category = DOC_CATEGORY_DISCOUNTS
@classmethod
def clean_codes(cls, codes, errors_list):
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 05a1d1b17f..c95b7a2893 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -18179,7 +18179,7 @@ type Mutation {
voucherCodeBulkDelete(
"""List of voucher codes IDs to delete."""
ids: [ID!]!
- ): VoucherCodeBulkDelete @webhookEventsInfo(asyncEvents: [VOUCHER_UPDATED], syncEvents: [])
+ ): VoucherCodeBulkDelete @doc(category: "Discounts") @webhookEventsInfo(asyncEvents: [VOUCHER_UPDATED], syncEvents: [])
"""
Export products to csv file.
@@ -28121,7 +28121,7 @@ Requires one of the following permissions: MANAGE_DISCOUNTS.
Triggers the following webhook events:
- VOUCHER_UPDATED (async): A voucher was updated.
"""
-type VoucherCodeBulkDelete @webhookEventsInfo(asyncEvents: [VOUCHER_UPDATED], syncEvents: []) {
+type VoucherCodeBulkDelete @doc(category: "Discounts") @webhookEventsInfo(asyncEvents: [VOUCHER_UPDATED], syncEvents: []) {
"""Returns how many codes were deleted."""
count: Int!
errors: [VoucherCodeBulkDeleteError!]!