Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add description field to ShippingMethodTranslatableContent type
IKarbowiakd2fdf07bad61
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex f02e5d72f3..329386dc68 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -4911,11 +4911,11 @@ enum ShippingErrorCode {type ShippingMethod implements Node & ObjectWithMetadata {id: ID!name: String!+ description: JSONStringminimumOrderWeight: WeightmaximumOrderWeight: WeightmaximumDeliveryDays: IntminimumDeliveryDays: Int- description: JSONStringprivateMetadata: [MetadataItem]!metadata: [MetadataItem]!type: ShippingMethodTypeEnum@@ -4964,6 +4964,7 @@ type ShippingMethodPostalCodeRule implements Node {type ShippingMethodTranslatableContent implements Node {id: ID!name: String!+ description: JSONStringtranslation(languageCode: LanguageCodeEnum!): ShippingMethodTranslationshippingMethod: ShippingMethod}diff --git a/saleor/graphql/translations/tests/test_translations.py b/saleor/graphql/translations/tests/test_translations.pyindex 6182a32ff5..03e3396022 100644--- a/saleor/graphql/translations/tests/test_translations.py+++ b/saleor/graphql/translations/tests/test_translations.py@@ -1966,6 +1966,7 @@ QUERY_TRANSLATION_SHIPPING_METHOD = """...on ShippingMethodTranslatableContent{idname+ descriptiontranslation(languageCode: $languageCode){name}@@ -2009,6 +2010,7 @@ def test_translation_query_shipping_method(content = get_graphql_content(response, ignore_errors=True)data = content["data"]["translation"]assert data["name"] == shipping_method.name+ assert data["description"] == shipping_method.descriptionassert data["translation"]["name"] == shipping_method_translation_fr.nameif return_shipping_method:assert data["shippingMethod"]["name"] == shipping_method.namediff --git a/saleor/graphql/translations/types.py b/saleor/graphql/translations/types.pyindex 16b8786f04..2c4962c6c2 100644--- a/saleor/graphql/translations/types.py+++ b/saleor/graphql/translations/types.py@@ -451,7 +451,7 @@ class ShippingMethodTranslatableContent(CountableDjangoObjectType):class Meta:model = shipping_models.ShippingMethodinterfaces = [graphene.relay.Node]- only_fields = BASIC_TRANSLATABLE_FIELDS+ only_fields = BASIC_TRANSLATABLE_FIELDS + ["description"]@staticmethod@permission_required(ShippingPermissions.MANAGE_SHIPPING)