I use product query in Storefront API, and got many wrong value of encodedVariantAvailability and encodedVariantExistence fields.
I try 2025-01 and 2025-04, they all return wrong value.
In one case, I got "v1_1 " as encodedVariantExistence, but the product only has a default option with one default value.
{
"encodedVariantAvailability": "v1_",
"encodedVariantExistence": "v1_1",
"options": [
{
"name": "Title",
"optionValues": [
{
"name": "Default Title"
}
]
}
],
"variants": {
"nodes": [
{
"availableForSale": false,
"currentlyNotInStock": false,
"selectedOptions": [
{
"name": "Title",
"value": "Default Title"
}
],
"title": "Default Title"
}
]
}
}
In document, the index of option value start from 0, but the value retrun from the API start from 1 sometimes.
Another case here:
The correct value of encoded_variant_availability and encoded_variant_existence should be v1_0-99.
I think this is a bug.