cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling "Inclue in menu" filter for categories GraphQL interface

Enabling "Inclue in menu" filter for categories GraphQL interface

Would be great to add "Include in menu" filter option for this interface:

https://developer.adobe.com/commerce/webapi/graphql/schema/products/queries/category-list/#categoryf...

 

If you are creating a menu using GraphQL - you might want to retrieve only categories that should be shown in the menu.

 

This core feature: https://docs.magento.com/user-guide/v2.3/catalog/category-create.html#step-2-complete-the-basic-info... (point 2)

However, it's not supported by the GraphQL interface.

 

Without such a filter you will receive all categories, including those which shouldn't be in the menu.

2 Comments
rechnungenb594
New Member

I just stumbled upon the same problem - did u find any solution?

Raj_Rupak
New Contributor

Refer to the following GraphQL query. It may help

 

query getMenuItems {
  categoryList {
    uid
    name
    children {
      uid
      include_in_menu
      name
      position
      url_path
      children {
        uid
        include_in_menu
        name
        position
        url_path
        children {
          uid
          include_in_menu
          name
          position
          url_path
        }
      }
    }
  }
}

 

- rxraj

Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.