categories
Get a paginated list of product categories with optional search and sorting
Arguments
| Argument | Type | Description |
|---|---|---|
page | Int! | Default 1 |
pageSize | Int! | Default 20 |
searchTerm | String | |
sort | CategorySortOrderType |
Returns
| Field | Type | Description |
|---|---|---|
items | [ProductCategoryPage!]! | List of category pages in the result |
pagination | Pagination! | Where this page sits within the full result set |
Example
query { categories( page: 1 pageSize: 50 searchTerm: "electronics" sort: NAME_ASCENDING ) { pagination { totalCount hasNextPage } items { path category { id key name description ancestors { id name } } } } }{ "data": { "categories": { "pagination": { "totalCount": 1, "hasNextPage": true }, "items": [ { "path": "/example", "category": { "id": "id-1", "key": "Example", "name": "Example", "description": "Example", "ancestors": [ { "id": "id-1", "name": "Example" } ] } } ] } }}The query is the example the schema documents. The response shows its shape with placeholder values.
Served by
| @evolve-framework/commercetools | Resolved |
| @evolve-framework/medusa | Resolved |
| @evolve-framework/sfcc | Resolved |

