Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Make kind field on ProductType required

IKarbowiakf2a2c5861a3e
diff --git a/saleor/graphql/product/types/products.py b/saleor/graphql/product/types/products.py
index de7c925c45..36e717775e 100644
--- a/saleor/graphql/product/types/products.py
+++ b/saleor/graphql/product/types/products.py
@@ -927,7 +927,7 @@ class Product(ChannelContextTypeWithMetadata, CountableDjangoObjectType):
@key(fields="id")
class ProductType(CountableDjangoObjectType):
- kind = ProductTypeKindEnum(description="The product type kind.")
+ kind = ProductTypeKindEnum(description="The product type kind.", required=True)
products = ChannelContextFilterConnectionField(
Product,
channel=graphene.String(
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 19652f965d..2d727c1afd 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -5382,7 +5382,7 @@ type ProductType implements Node & ObjectWithMetadata {
weight: Weight
privateMetadata: [MetadataItem]!
metadata: [MetadataItem]!
- kind: ProductTypeKindEnum
+ kind: ProductTypeKindEnum!
products(channel: String, before: String, after: String, first: Int, last: Int): ProductCountableConnection @deprecated(reason: "This field will be removed in Saleor 4.0. Use the top-level `products` query with the `productTypes` filter.")
taxType: TaxType
variantAttributes(variantSelection: VariantAttributeScope): [Attribute]