Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add missing descriptions to attribute types (#13165)
Filip Owczarekb167c9fe15b6
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex e81ad87e1e..de38e6efdf 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -24,6 +24,7 @@ All notable, unreleased changes to this project will be documented in this file.- Drop TranslationProxy and replace `translated` model property with `get_translation` function where needed. - #13156 by @zedzior- Add missing descriptions to Account module. - #13155 by @fowczarek- Add missing descriptions to channel module. - #13166 by @fowczarek+- Add missing descriptions to attribute module. - #13165 by @fowczarek# 3.14.0diff --git a/saleor/graphql/attribute/types.py b/saleor/graphql/attribute/types.pyindex 787ae03c53..6e2d1a4cee 100644--- a/saleor/graphql/attribute/types.py+++ b/saleor/graphql/attribute/types.py@@ -50,7 +50,7 @@ from .utils import AttributeAssignmentMixinclass AttributeValue(ModelObjectType[models.AttributeValue]):- id = graphene.GlobalID(required=True)+ id = graphene.GlobalID(required=True, description="The ID of the attribute value.")name = graphene.String(description=AttributeValueDescriptions.NAME)slug = graphene.String(description=AttributeValueDescriptions.SLUG)value = graphene.String(description=AttributeValueDescriptions.VALUE)@@ -155,7 +155,7 @@ class AttributeValueCountableConnection(CountableConnection):class Attribute(ModelObjectType[models.Attribute]):- id = graphene.GlobalID(required=True)+ id = graphene.GlobalID(required=True, description="The ID of the attribute.")input_type = AttributeInputTypeEnum(description=AttributeDescriptions.INPUT_TYPE)entity_type = AttributeEntityTypeEnum(description=AttributeDescriptions.ENTITY_TYPE, required=False@@ -244,10 +244,17 @@ class Attribute(ModelObjectType[models.Attribute]):product_types = ConnectionField("saleor.graphql.product.types.ProductTypeCountableConnection",required=True,+ description=(+ "A list of product types that use this attribute as a product attribute."+ ),)product_variant_types = ConnectionField("saleor.graphql.product.types.ProductTypeCountableConnection",required=True,+ description=(+ "A list of product types that use this attribute "+ "as a product variant attribute."+ ),)external_reference = graphene.String(description=f"External ID of this attribute. {ADDED_IN_310}",diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex c9417f8270..ecedc94abd 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -5789,6 +5789,7 @@ type TaxClassCountryRate @doc(category: "Taxes") {Custom attribute of a product. Attributes can be assigned to products and variants at the product type level."""type Attribute implements Node & ObjectWithMetadata @doc(category: "Attributes") {+ """The ID of the attribute."""id: ID!"""List of private metadata items. Requires staff permissions to access."""@@ -5918,6 +5919,10 @@ type Attribute implements Node & ObjectWithMetadata @doc(category: "Attributes")"""Flag indicating that attribute has predefined choices."""withChoices: Boolean!++ """+ A list of product types that use this attribute as a product attribute.+ """productTypes("""Return the elements in the list that come before the specified cursor."""before: String@@ -5935,6 +5940,10 @@ type Attribute implements Node & ObjectWithMetadata @doc(category: "Attributes")"""last: Int): ProductTypeCountableConnection!++ """+ A list of product types that use this attribute as a product variant attribute.+ """productVariantTypes("""Return the elements in the list that come before the specified cursor."""before: String@@ -6046,6 +6055,7 @@ type AttributeValueCountableEdge @doc(category: "Attributes") {"""Represents a value of an attribute."""type AttributeValue implements Node @doc(category: "Attributes") {+ """The ID of the attribute value."""id: ID!"""Name of a value displayed in the interface."""