Skip to content

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

Mark missed fields as non-nullable

Rafał Pitoń4d31e1447410
diff --git a/saleor/graphql/attribute/types.py b/saleor/graphql/attribute/types.py
index ac1e0adb56..e332f89c8a 100644
--- a/saleor/graphql/attribute/types.py
+++ b/saleor/graphql/attribute/types.py
@@ -168,10 +168,12 @@ class Attribute(CountableDjangoObjectType):
)
product_types = ConnectionField(
- "saleor.graphql.product.types.ProductTypeCountableConnection"
+ "saleor.graphql.product.types.ProductTypeCountableConnection",
+ required=True,
)
product_variant_types = ConnectionField(
- "saleor.graphql.product.types.ProductTypeCountableConnection"
+ "saleor.graphql.product.types.ProductTypeCountableConnection",
+ required=True,
)
class Meta:
@@ -188,7 +190,9 @@ class Attribute(CountableDjangoObjectType):
if root.input_type in AttributeInputType.TYPES_WITH_CHOICES:
qs = root.values.all()
else:
- qs = cast(Manager[AttributeValue], models.AttributeValue.objects.none())
+ qs = cast(
+ Manager[models.AttributeValue], models.AttributeValue.objects.none()
+ )
qs = filter_connection_queryset(qs, kwargs)
return create_connection_slice(
diff --git a/saleor/graphql/shipping/schema.py b/saleor/graphql/shipping/schema.py
index 4d04639e5d..e7d51d8c4b 100644
--- a/saleor/graphql/shipping/schema.py
+++ b/saleor/graphql/shipping/schema.py
@@ -45,7 +45,6 @@ class ShippingQueries(graphene.ObjectType):
description="Slug of a channel for which the data should be returned."
),
description="List of the shop's shipping zones.",
- required=True,
)
@permission_required(ShippingPermissions.MANAGE_SHIPPING)
diff --git a/saleor/graphql/warehouse/types.py b/saleor/graphql/warehouse/types.py
index 61e2942a97..0640e32055 100644
--- a/saleor/graphql/warehouse/types.py
+++ b/saleor/graphql/warehouse/types.py
@@ -66,7 +66,8 @@ class Warehouse(CountableDjangoObjectType):
required=True,
)
shipping_zones = ConnectionField(
- "saleor.graphql.shipping.types.ShippingZoneCountableConnection"
+ "saleor.graphql.shipping.types.ShippingZoneCountableConnection",
+ required=True,
)
class Meta: