Solved

How to query Products by Description using GraphQL ?

aldoalprak
Shopify Partner
17 1 0

Hey,

 

I want to query Product products that contain some word in the description, refer to this documentation we can't query based on the description. Is there any way(s) to do this?

 

I expect something like this:

products(description:*hello*) {
        edges {
          node {
            id
            title
        }
      }
}
it will give all the product that contains "hello" in their product description

Thank you in advance!

Accepted Solution (1)

vix
Shopify Staff
540 103 122

This is an accepted solution.

Hey @aldoalprak 

 

As the docs mention, there is no way to query based on description. The description box is quite a large string to analyze and searching by keyword is best suited to title, sku, metafields, or tags if needed. 

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Reply 1 (1)

vix
Shopify Staff
540 103 122

This is an accepted solution.

Hey @aldoalprak 

 

As the docs mention, there is no way to query based on description. The description box is quite a large string to analyze and searching by keyword is best suited to title, sku, metafields, or tags if needed. 

To learn more visit the Shopify Help Center or the Community Blog.