Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Can I query a product by title or a metafield?

Can I query a product by title or a metafield?

AH63935
Shopify Partner
37 1 27

Hi I'm wondering if I can query for a product with a title or metafield. For example if a product contains the word "oversize" in the title, I would want to query for it. Or for the metafield example, if a product has "blue" for the color metafield. Thanks!

Reply 1 (1)

Eric-HAN
Shopify Partner
290 30 31

HI, 

you could refer to this .

query {
  products(first: 10, query:"title: *title-key-word*") {
    edges {
      node {
        id
        title
        handle
        
      }
    }
  }
}

 

- Helpful? Please hit Like and mark it as a solution
Want to modify or custom changes on store? Let me help.
- Feel free to Email Me    Buy Me A Coffee