Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add missing description to menu types (#13409)
Bhuvneshf670968afa79
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex b20967f6f5..c3fc44f1c1 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -109,6 +109,7 @@ Shipping methods can be removed by the user after it has been assigned to a chec- Fix deleting event payloads by adding batches - #13368 by @jakubkuc- Add missing descriptions to Shipping module. - #13372 by @Smit-Parmar- Fix error handling in the permission check for `Query.webhook` - #13378 by @patrys+- Add missing descriptions to menu module - #13409 by @devilsautumn# 3.14.0diff --git a/saleor/graphql/menu/types.py b/saleor/graphql/menu/types.pyindex 72e4a8391b..bf88fae9fd 100644--- a/saleor/graphql/menu/types.py+++ b/saleor/graphql/menu/types.py@@ -36,10 +36,12 @@ from .dataloaders import (class Menu(ChannelContextTypeWithMetadata[models.Menu]):- id = graphene.GlobalID(required=True)- name = graphene.String(required=True)- slug = graphene.String(required=True)- items = NonNullList(lambda: MenuItem)+ id = graphene.GlobalID(required=True, description="The ID of the menu.")+ name = graphene.String(required=True, description="The name of the menu.")+ slug = graphene.String(required=True, description="Slug of the menu.")+ items = NonNullList(+ lambda: MenuItem, description="Menu items associated with this menu."+ )class Meta:default_resolver = ChannelContextType.resolver_with_context@@ -68,11 +70,20 @@ class MenuCountableConnection(CountableConnection):class MenuItem(ChannelContextTypeWithMetadata[models.MenuItem]):- id = graphene.GlobalID(required=True)- name = graphene.String(required=True)- menu = graphene.Field(Menu, required=True)- parent = graphene.Field(lambda: MenuItem)- category = graphene.Field(Category)+ id = graphene.GlobalID(required=True, description="The ID of the menu item.")+ name = graphene.String(required=True, description="The name of the menu item.")+ menu = graphene.Field(+ Menu,+ required=True,+ description="Represents the menu to which the menu item belongs.",+ )+ parent = graphene.Field(+ lambda: MenuItem,+ description="ID of parent menu item. If empty, menu will be top level menu.",+ )+ category = graphene.Field(+ Category, description="Category associated with the menu item."+ )collection = graphene.Field(Collection,description=(@@ -89,8 +100,15 @@ class MenuItem(ChannelContextTypeWithMetadata[models.MenuItem]):f"{PagePermissions.MANAGE_PAGES.name}."),)- level = graphene.Int(required=True)- children = NonNullList(lambda: MenuItem)+ level = graphene.Int(+ required=True,+ description="Indicates the position of the menu item within the menu "+ "structure.",+ )+ children = NonNullList(+ lambda: MenuItem,+ description="Represents the child items of the current menu item.",+ )url = graphene.String(description="URL to the menu item.")translation = TranslationField(MenuItemTranslation,diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex f0a27357dc..eed365b24a 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -8914,6 +8914,7 @@ type MenuItemTranslation implements Node @doc(category: "Menu") {Represents a single item of the related menu. Can store categories, collection or pages."""type MenuItem implements Node & ObjectWithMetadata @doc(category: "Menu") {+ """The ID of the menu item."""id: ID!"""List of private metadata items. Requires staff permissions to access."""@@ -8953,9 +8954,17 @@ type MenuItem implements Node & ObjectWithMetadata @doc(category: "Menu") {Added in Saleor 3.3."""metafields(keys: [String!]): Metadata++ """The name of the menu item."""name: String!++ """Represents the menu to which the menu item belongs."""menu: Menu!++ """ID of parent menu item. If empty, menu will be top level menu."""parent: MenuItem++ """Category associated with the menu item."""category: Category"""@@ -8967,7 +8976,11 @@ type MenuItem implements Node & ObjectWithMetadata @doc(category: "Menu") {A page associated with this menu item. Requires one of the following permissions to include unpublished items: MANAGE_PAGES."""page: Page++ """Indicates the position of the menu item within the menu structure."""level: Int!++ """Represents the child items of the current menu item."""children: [MenuItem!]"""URL to the menu item."""@@ -8984,6 +8997,7 @@ type MenuItem implements Node & ObjectWithMetadata @doc(category: "Menu") {Represents a single menu - an object that is used to help navigate through the store."""type Menu implements Node & ObjectWithMetadata @doc(category: "Menu") {+ """The ID of the menu."""id: ID!"""List of private metadata items. Requires staff permissions to access."""@@ -9023,8 +9037,14 @@ type Menu implements Node & ObjectWithMetadata @doc(category: "Menu") {Added in Saleor 3.3."""metafields(keys: [String!]): Metadata++ """The name of the menu."""name: String!++ """Slug of the menu."""slug: String!++ """Menu items associated with this menu."""items: [MenuItem!]}