This is available for GraphQL. Can you please help me with the REST API mechanism to get the product category
Topic summary
Retrieving a product’s Category is supported in the Admin GraphQL API (version 2022-10+). Use product.productCategory.productTaxonomyNode to access the category data; an example query was shared. A note warns that the field may return null until the category is explicitly accepted in the admin (tick/confirm the Product Category).
Limitations and gaps:
- Not available in the Storefront GraphQL API, which affects use cases like passing category into useServerAnalytics in Hydrogen apps.
- Not available via the REST Products endpoint; multiple users requested a REST mechanism and asked if support is planned.
Resources and artifacts:
- A link to the ProductCategory object documentation was provided, and a GraphQL query snippet was included. No images or attachments are essential to understand the solution.
Current status:
- Admin GraphQL solution exists (2022-10+).
- Storefront GraphQL and REST support are not provided in this thread, with no confirmed timeline or official commitment. The discussion remains open on REST/Storefront availability.
4 Likes