Magidoc

productReorderVariants
Mutation

Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook.

Arguments

#

moves

Non-null

The list of variant reordering operations.

productId

ID !
Non-null

Id of product that variants order will be altered.

Response

#

Returns ProductReorderVariants .

Example

#

    mutation ($moves: [ReorderInput!]!, $productId: ID!) {
  productReorderVariants(moves: $moves, productId: $productId) {
    product {
      id
      publicationDate
      description
      descriptionHtml
      externalId
      externalSource
      mpn
      brand
      manufacturer
      model
      seoTitle
      seoDescription
      name
      slug
      currency
      updatedAt
      createdAt
      chargeTaxes
      availableForPurchase
      visibleInListings
      overridePrice
      overrideCurrency
      status
      subStatus
      isPriceOverrideAllowed
      isShippingRequired
      isDigital
      isAvailable
      isAvailableForPurchase
      sortOrder
      isPublished
      actions
      sortPriorityWeight
    }
    productErrors {
      field
      message
      code
      attributes
    }
  }
}

  

3