Categories and sub categories using API - headless

es-llll
New Member
1 0 0

What is the best way to display categories and sub categories through an API for a headless front end? I can't use the menu items in the store front as they are not available in my GraphQL layer.

I am trying to build a main category structure like: Mens > Clothing, Mens > Footwear. And also have other structures like Brand and Colour that are assigned to each product. I'd like to list these on a page that can be filtered to a granular level.

Can these structures be created using collections and product types? Or is a better approach to define a JSON structure of the categories and then set up each product in Shopify to have a flat level of tags?

Replies 0 (0)