GraphQL API - variant order on productCreate

Chris_Marshall1
Shopify Partner
32 1 16

Hi,

 

I'm trying to define the order of variants within a productCreate call, but the positions defined in the call are not being reflected once the product has imported. We're getting no errors.

 

The variant section from the call is given below - any pointers as to what I'm doing wrong would be appreciated.

 

Thanks

Chris

 

"variants": [
                {
                    "options": [
                        "Product only"
                    ],
                    "price": 799.00,
                    "position": 4
                },
                {
                    "options": [
                        "4pc starter bundle"
                    ],
                    "price": 899.00,
                    "compareAtPrice": 1046.00,
                    "position": 1
                },
                {
                    "options": [
                        "6pc essential starter bundle"
                    ],
                    "price": 999.00,
                    "compareAtPrice": 1240.00,
                    "position": 3
                },
                {
                    "options": [
                        "9pc complete bundle"
                    ],
                    "price": 1199.00,
                    "compareAtPrice": 1529.00,
                    "position": 2
                }
            ],
0 Likes
SBD_
Shopify Staff
Shopify Staff
1044 141 185

Hey @Chris_Marshall1 

 

Thanks for reporting this, I'm able to replicate. It looks like this issue is being tracked internally. In the mean time, the API seems to respect the positions in the array.

0 Likes