Skip to content

Update searchCategory query examples and responses#337

Open
meker12 wants to merge 3 commits intomainfrom
COMOPT-1969-update-searchcategory-query-example
Open

Update searchCategory query examples and responses#337
meker12 wants to merge 3 commits intomainfrom
COMOPT-1969-update-searchcategory-query-example

Conversation

@meker12
Copy link
Copy Markdown
Contributor

@meker12 meker12 commented Apr 21, 2026

Purpose of this pull request

Updates the searchCategory query explanation in the Implement categories on the storefront topic

JIRA: COMOPT-1969

Affected pages

https://developer.adobe.com/commerce/services/optimizer/merchandising-services/categories-storefront-implementation/

@meker12 meker12 added the technical Changes to code, examples, or technical processes label Apr 21, 2026
@meker12 meker12 self-assigned this Apr 21, 2026
@github-project-automation github-project-automation Bot moved this to 📋 Needs Review in Commerce - Pull Requests Apr 21, 2026
@meker12 meker12 marked this pull request as ready for review April 21, 2026 18:59
Co-authored-by: Margaret Eker <meker@adobe.com>
Co-authored-by: Margaret Eker <meker@adobe.com>
@meker12 meker12 requested a review from keharper April 21, 2026 19:35
The `searchCategory` query matches category **names** against a `searchTerm` and returns a paginated [`SearchCategoryResultPage`](https://developer.adobe.com/commerce/services/graphql-api/merchandising-api/index.html#definition-SearchCategoryResultPage).

- If the `family` argument is omitted, it returns categories across all families.
- The `searchTerm` argument is case-insensitive and must be a minimum of three characters.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- The `searchTerm` argument is case-insensitive and must be a minimum of three characters.
- The `searchTerm` argument is case-insensitive and must be a minimum of three characters.

### Search categories by name

Shoppers and internal tools often find categories by typing a fragment of the display name rather than browsing the tree. The following example calls `searchCategory` with `searchTerm: "Shorts"` and no `family`, then requests `totalCount`, a page of `items` with `slug`, `name`, and `level`, plus `pageInfo` for pagination. The response lists every category whose name matches across the catalog scope your API uses.
Shoppers and internal tools often find categories by typing a fragment of the display name rather than browsing the tree. The following example calls `searchCategory` with `searchTerm: "Men"` and no `family`, then requests `totalCount`, a page of `items` with `slug`, `name`, and `level`, plus `pageInfo` for pagination. The response lists every category whose name matches across the catalog scope your API uses.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Shoppers and internal tools often find categories by typing a fragment of the display name rather than browsing the tree. The following example calls `searchCategory` with `searchTerm: "Men"` and no `family`, then requests `totalCount`, a page of `items` with `slug`, `name`, and `level`, plus `pageInfo` for pagination. The response lists every category whose name matches across the catalog scope your API uses.
Shoppers and internal tools often find categories by typing a fragment of the display name rather than browsing the tree. The following example calls `searchCategory` with `searchTerm: "Men"` and no `family`, then requests `totalCount`, a page of `items` with `slug`, `name`, and `level`. The response lists every category whose name matches across the catalog scope your API uses.

You removed pageInfo from your query. I'm not sure if you really should, given you link to it below. But then, I'm only looking at a diff, not the whole topic.

@github-project-automation github-project-automation Bot moved this from 📋 Needs Review to 👍 Approved in Commerce - Pull Requests Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical Changes to code, examples, or technical processes

Projects

Status: 👍 Approved

Development

Successfully merging this pull request may close these issues.

3 participants