Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add added in 31 msg to new fields
IKarbowiak73b8f4c2a451
diff --git a/saleor/graphql/giftcard/bulk_mutations.py b/saleor/graphql/giftcard/bulk_mutations.pyindex 8611c8f024..cff3bd1bc1 100644--- a/saleor/graphql/giftcard/bulk_mutations.py+++ b/saleor/graphql/giftcard/bulk_mutations.py@@ -3,6 +3,7 @@ import graphenefrom ...core.permissions import GiftcardPermissionsfrom ...core.tracing import traced_atomic_transactionfrom ...giftcard import events, models+from ..core.descriptions import ADDED_IN_31from ..core.mutations import BaseBulkMutation, ModelBulkDeleteMutationfrom ..core.types.common import GiftCardError@@ -14,7 +15,7 @@ class GiftCardBulkDelete(ModelBulkDeleteMutation):)class Meta:- description = "Delete gift cards."+ description = f"{ADDED_IN_31} Delete gift cards."model = models.GiftCardpermissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)error_type_class = GiftCardError@@ -27,7 +28,7 @@ class GiftCardBulkActivate(BaseBulkMutation):)class Meta:- description = "Activate gift cards."+ description = f"{ADDED_IN_31} Activate gift cards."model = models.GiftCardpermissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)error_type_class = GiftCardError@@ -52,7 +53,7 @@ class GiftCardBulkDeactivate(BaseBulkMutation):)class Meta:- description = "Deactivate gift cards."+ description = f"{ADDED_IN_31} Deactivate gift cards."model = models.GiftCardpermissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)error_type_class = GiftCardErrordiff --git a/saleor/graphql/giftcard/mutations.py b/saleor/graphql/giftcard/mutations.pyindex 55c03177a3..99b53bfcd7 100644--- a/saleor/graphql/giftcard/mutations.py+++ b/saleor/graphql/giftcard/mutations.py@@ -22,7 +22,9 @@ from .types import GiftCard, GiftCardEventclass GiftCardInput(graphene.InputObjectType):tag = graphene.String(description=f"{ADDED_IN_31} The gift card tag.")- expiry_date = graphene.types.datetime.Date(description="The gift card expiry date.")+ expiry_date = graphene.types.datetime.Date(+ description=f"{ADDED_IN_31} The gift card expiry date."+ )# DEPRECATEDstart_date = graphene.types.datetime.Date(@@ -47,10 +49,12 @@ class GiftCardCreateInput(GiftCardInput):description="Email of the customer to whom gift card will be sent.",)channel = graphene.String(- description="Slug of a channel from which the email should be sent."+ description=(+ f"{ADDED_IN_31} Slug of a channel from which the email should be sent."+ ))is_active = graphene.Boolean(- required=True, description="Determine if gift card is active."+ required=True, description=f"{ADDED_IN_31} Determine if gift card is active.")code = graphene.String(required=False,@@ -59,7 +63,9 @@ class GiftCardCreateInput(GiftCardInput):f"{DEPRECATED_IN_3X_INPUT} The code is now auto generated."),)- note = graphene.String(description="The gift card note from the staff member.")+ note = graphene.String(+ description=f"{ADDED_IN_31} The gift card note from the staff member."+ )class GiftCardUpdateInput(GiftCardInput):@@ -340,7 +346,7 @@ class GiftCardResend(BaseMutation):)class Meta:- description = "Resend a gift card."+ description = f"{ADDED_IN_31} Resend a gift card."permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)error_type_class = GiftCardError@@ -413,7 +419,7 @@ class GiftCardAddNote(BaseMutation):)class Meta:- description = "Adds note to the gift card."+ description = f"{ADDED_IN_31} Adds note to the gift card."permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)error_type_class = GiftCardErrordiff --git a/saleor/graphql/giftcard/types.py b/saleor/graphql/giftcard/types.pyindex 8f328b9ddc..b3c0798ca6 100644--- a/saleor/graphql/giftcard/types.py+++ b/saleor/graphql/giftcard/types.py@@ -76,7 +76,7 @@ class GiftCardEvent(CountableDjangoObjectType):)class Meta:- description = "History log of the gift card."+ description = f"{ADDED_IN_31} History log of the gift card."model = models.GiftCardEventinterfaces = [graphene.relay.Node]only_fields = ["id"]