Skip to content

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

Make List fields non nullable

Jakub Draganek24c899114e3f
diff --git a/saleor/graphql/account/types.py b/saleor/graphql/account/types.py
index 223231e41b..cfbea8727b 100644
--- a/saleor/graphql/account/types.py
+++ b/saleor/graphql/account/types.py
@@ -188,7 +188,9 @@ class User(CountableDjangoObjectType):
description="List of stored payment sources",
)
private_meta = graphene.List(
- MetaStore, description="List of privately stored metadata groups."
+ MetaStore,
+ required=True,
+ description="List of privately stored metadata groups.",
)
class Meta:
diff --git a/saleor/graphql/account/types_meta.py b/saleor/graphql/account/types_meta.py
index 453d14d319..d01d8ed1f7 100644
--- a/saleor/graphql/account/types_meta.py
+++ b/saleor/graphql/account/types_meta.py
@@ -8,7 +8,9 @@ class MetaItem(graphene.ObjectType):
class MetaClientStore(graphene.ObjectType):
name = graphene.String(required=True, description="Metadata clients name.")
- metadata = graphene.List(MetaItem, description="Metadata stored for a client.")
+ metadata = graphene.List(
+ MetaItem, required=True, description="Metadata stored for a client."
+ )
@staticmethod
def resolve_metadata(root, _info):
@@ -18,7 +20,9 @@ class MetaClientStore(graphene.ObjectType):
class MetaStore(graphene.ObjectType):
label = graphene.String(required=True, description="Name of metadata client group.")
clients = graphene.List(
- MetaClientStore, description="List of clients that stored metadata in a group."
+ MetaClientStore,
+ required=True,
+ description="List of clients that stored metadata in a group.",
)
@staticmethod