I'm just getting started with the new Shopify GraphQL Admin API. I'm trying to retreive all products, where the title
field contains a certain word.
Currently I can successfully retrieve a product by including the full product title (exact match):
{
shop {
id
name
}
products(first: 10, query:"title:'RAVEN DUSTY OLIVE/SILVER MESH'") {
edges {
node {
productType
title
}
}
}
}
However, I want to partially match the title to display all products with the word "Raven" anywhere in the title, but the following returns no results:
{
shop {
id
name
}
products(first: 10, query:"title:'RAVEN'") {
edges {
node {
productType
title
}
}
}
}
Any ideas on how to get the partial matching working?
Bjorn! This should work:
{
shop {
id
name
}
products(first: 10, query:"title:RAVEN*") {
edges {
node {
productType
title
}
}
}
}
Check out the docs: https://help.shopify.com/en/api/getting-started/search-syntax
Any tips on why "title:RAVEN*" sync would not be working for me? I have tried all the obvious things. Testing collections edge instead of products.