The “products” query does not return about 20-30% of the newly created products. The issue started a couple of days ago, we’re using version 2022-10.
Here’s a simplified query we use for fetching the products:
query (
$first: Int
$sortKey: ProductSortKeys
$after: String
$query: String
$reverse: Boolean
$country: CountryCode!
) @inContext(country: $country) {
products(
first: $first
sortKey: $sortKey
after: $after
query: $query
reverse: $reverse
) {
edges {
node {
id
handle
}
}
}
}
What happens is that a product might get returned if queried by a tag:
{
"country": "FI",
"first": 250,
"query": "available_for_sale:true AND (tag:rugs)",
"reverse": true,
"sortKey": "CREATED_AT"
}
but not when this filter is missing:
{
"country": "FI",
"first": 250,
"query": "available_for_sale:true",
"reverse": true,
"sortKey": "CREATED_AT"
}
It might also get returned if the country is “SE” but not if the country is “FI” and vice versa. The missing products are “Active”, have available quantity, the sales channel and the markets are set correctly and these settings are the same for all products.
Manually toggling the status from “Active” to “Draft” and back to “Active” OR toggling the sales channel (without making any other changes to the product) seems to eventually resolve the issue for all the missing products but in some cases this requires several attempts.