A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Wildcards do not seem to work for variant sku queries:
query { productVariants(first: 10, query: "sku:free*") { edges { node { sku
title
}
}
}
}
It does work for title, such as:
"title:free*"
Hi Snodgers,
When you do use "title:free*", what are you seeing returned, and what are you expecting for the SKU wildcard?
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi Liam!
I have the same issue with Variant's SKU's wildcard.
I have some products with SKUSs like TOY01, TOY02, ..., TOY10, ... TOY500.
While trying to get only products with skus from TOY01 to TOY09 i use that query:
{
productVariants(first: 250, query:"sku:TOY0*") {
nodes {
title
sku
}
}
}
But there is not correct result:
The same query with product titles works fine, but with variants SKU's looks like broken