Skip to content

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

Make quanity on StockInput required

IKarbowiak017e032d5e90
diff --git a/saleor/graphql/product/mutations/products.py b/saleor/graphql/product/mutations/products.py
index fbe196f748..46182e97cf 100644
--- a/saleor/graphql/product/mutations/products.py
+++ b/saleor/graphql/product/mutations/products.py
@@ -497,7 +497,9 @@ class StockInput(graphene.InputObjectType):
warehouse = graphene.ID(
required=True, description="Warehouse in which stock is located."
)
- quantity = graphene.Int(description="Quantity of items available for sell.")
+ quantity = graphene.Int(
+ required=True, description="Quantity of items available for sell."
+ )
class ProductCreateInput(ProductInput):
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 5c0c2bf760..946162c16b 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -5336,7 +5336,7 @@ input StockFilterInput {
input StockInput {
warehouse: ID!
- quantity: Int
+ quantity: Int!
}
enum TaxRateType {