This repository was archived by the owner on Dec 19, 2019. It is now read-only.
This repository was archived by the owner on Dec 19, 2019. It is now read-only.
Category filtering #10
Closed
Description
The category query should include a filter argument, similar to the products query. It should achieve parity with the REST API's search criteria functionality on category entities.
AC
- User is able to filter categories by
- id
- name
- description
- isAnchor: return only categories that are isAnchor=yes or isAnchor=no
- level: return only categories that are on the specified level in the tree
- parentId: return only direct children of the specified parent category
- Endpoint accepts new filter criteria, and returns an array of matching CategoryTree objects
References:
- See \Magento\CatalogGraphQl\Model\Resolver\Products::resolve as an example to generate search criteria with existing framework mechanisms
Expected result
- It is possible to filter categories based on filterable attributes in a category query.
- Functionality is covered by automated api-functional tests. See \Magento\GraphQl\Catalog\ProductViewTest::testQueryAllFieldsSimpleProduct as an example.