Skip to content

Commit

Permalink
Deprecate value field in AttributeValue type
Browse files Browse the repository at this point in the history
  • Loading branch information
maarcingebala authored and NyanKiyoshi committed Aug 7, 2019
1 parent be75216 commit 8c31ac0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions saleor/graphql/product/descriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)."""
5 changes: 4 additions & 1 deletion saleor/graphql/product/types/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion saleor/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ type AttributeValue implements Node {
name: String
slug: String
type: AttributeValueType
value: String
value: String @deprecated(reason: "This field is deprecated")
translation(languageCode: LanguageCodeEnum!): AttributeValueTranslation
inputType: AttributeInputTypeEnum
}
Expand Down

0 comments on commit 8c31ac0

Please sign in to comment.