App reviews, troubleshooting, and recommendations
I've successfully retrieved the Product Type using the Product.productType field in the GraphQL API, but I'm unable to find information on how to obtain the Product Category.
Solved! Go to the solution
This is an accepted solution.
Hi @panpert
This is Kate from PageFly - Landing page builder
To retrieve the product category in a GraphQL API, you may need to include the "category" field in your query. The exact implementation may vary depending on the specific API you're using, but it should look something like this:
query {
product(id: "product-id") {
productType
category {
title
id
}
}
}
Hope my answer will help you!
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
➜ Weekly updated Shopify tutorials on YouTube
All features are available from Free plan. Live Chat Support is available 24/7.
This is an accepted solution.
Hi @panpert
This is Kate from PageFly - Landing page builder
To retrieve the product category in a GraphQL API, you may need to include the "category" field in your query. The exact implementation may vary depending on the specific API you're using, but it should look something like this:
query {
product(id: "product-id") {
productType
category {
title
id
}
}
}
Hope my answer will help you!
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
➜ Weekly updated Shopify tutorials on YouTube
All features are available from Free plan. Live Chat Support is available 24/7.
Thank Kate, this is exactly what I was looking for
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024