Skip to content

Graphql get products #145

Answered by mustafahoda
dyk9456 asked this question in Help
Feb 21, 2023 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Hi @dyk9456 ,

You can use the following GraphQL Query to get products by providing the Category ID. This will work for both Category and Subcategories.

query getCategories {
	categoryById(id: "<CATEGORY_ID>"){
        topId
        name
        products {
            id
            name
        }
    }
}

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@dyk9456
Comment options

@mustafahoda
Comment options

@agsmartwolf
Comment options

@logeshswell
Comment options

Answer selected by logeshswell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
enhancement New feature or request graphql
4 participants