The categoryList field introduced in 2.3.4 should be extended to support the fetching of categories by url_path. Typically a website would indeed have the url_path of the category in the URL, so it would be straightforward to be able to use this field to fetch the corresponding Magento category.
Expected behavior (*)
CategoryFilterInput has an extra url_path field of type FilterEqualTypeInput.
Benefits
This would allow websites using URLs that contain category url paths to easily lookup categories. For example:
https://myshop.com/men/tops --> lookup category with url_path = /men/tops
Currently one has to lookup the category with url_key = tops and then filter the returned categories with url_path = /men/tops to make sure that all other tops categories are ignored (for example, /women/tops).
The alternative is to use urlResolver but this requires two queries to fetch the category.
Description (*)
The
categoryList
field introduced in 2.3.4 should be extended to support the fetching of categories byurl_path
. Typically a website would indeed have theurl_path
of the category in the URL, so it would be straightforward to be able to use this field to fetch the corresponding Magento category.Expected behavior (*)
CategoryFilterInput
has an extraurl_path
field of typeFilterEqualTypeInput
.Benefits
This would allow websites using URLs that contain category url paths to easily lookup categories. For example:
https://myshop.com/men/tops
--> lookup category withurl_path = /men/tops
Currently one has to lookup the category with
url_key = tops
and then filter the returned categories withurl_path = /men/tops
to make sure that all other tops categories are ignored (for example,/women/tops
).The alternative is to use
urlResolver
but this requires two queries to fetch the category.