Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Deprecate value field in AttributeValue type
Marcin Gębala8c31ac01de8b
diff --git a/saleor/graphql/product/descriptions.py b/saleor/graphql/product/descriptions.pyindex 25661f1905..063e32564b 100644--- a/saleor/graphql/product/descriptions.py+++ b/saleor/graphql/product/descriptions.py@@ -22,7 +22,7 @@ class AttributeValueDescriptions:ID = "The ID of a value displayed in the interface."NAME = "Name of a value displayed in the interface."SLUG = "Internal representation of a value (unique per attribute)."- TYPE = """Type of value (used only when `value` field is set)."""- VALUE = """Special value other than a textual name. Possible types are:- string (default), CSS color property, CSS gradient property, URL- (e.g. link to an image)."""+ TYPE = "Type of value (used only when `value` field is set)."+ VALUE = """DEPRECATED: This field is deprecated.+ Special value other than a textual name. Possible types are: string (default),+ CSS color property, CSS gradient property, URL (e.g. link to an image)."""diff --git a/saleor/graphql/product/types/attributes.py b/saleor/graphql/product/types/attributes.pyindex dae3e66cbe..c0386da82d 100644--- a/saleor/graphql/product/types/attributes.py+++ b/saleor/graphql/product/types/attributes.py@@ -51,7 +51,10 @@ class AttributeValue(CountableDjangoObjectType):name = graphene.String(description=AttributeValueDescriptions.NAME)slug = graphene.String(description=AttributeValueDescriptions.SLUG)type = AttributeValueType(description=AttributeValueDescriptions.TYPE)- value = graphene.String(description=AttributeValueDescriptions.VALUE)+ value = graphene.String(+ description=AttributeValueDescriptions.VALUE,+ deprecation_reason="This field is deprecated",+ )translation = graphene.Field(AttributeValueTranslation,language_code=graphene.Argument(diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex 24fd2eea83..fcfafd51b4 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -321,7 +321,7 @@ type AttributeValue implements Node {name: Stringslug: Stringtype: AttributeValueType- value: String+ value: String @deprecated(reason: "This field is deprecated")translation(languageCode: LanguageCodeEnum!): AttributeValueTranslationinputType: AttributeInputTypeEnum}