Using the REST API, we successfully mapped and updated the variant positions on Shopify. However, when attempting the same process with the GraphQL API, we encountered the following error:
"Variant position must be between 1 and the number of variants on the product."
This issue causes the variant order to change unpredictably each time the product is updated through the flow. To prevent the sizes from scrambling, we need to correctly map the variant positions when using the GraphQL API.