OBJECT

ProductVariant

Represents a version of a product such as different size or color.

link GraphQL Schema definition

  • type ProductVariant implements Node {
  • # The ID of the object.
  • id: ID!
  • sku: String!
  • name: String!
  • product: Product!
  • trackInventory: Boolean!
  • quantityAllocated: Int!
  • weight: Weight
  • # List of privately stored metadata namespaces.
  • privateMeta: [MetaStore]!
  • # List of publicly stored metadata namespaces.
  • meta: [MetaStore]!
  • # Quantity of a product in the store's possession, including the
  • # allocated stock that is waiting for shipment.
  • quantity: Int!
  • # Quantity of a product available for sale.
  • stockQuantity: Int!
  • # Override the base price of a product if necessary. A value of `null`
  • # indicates that the default product price is used.
  • priceOverride: Money
  • # Price of the product variant.
  • price: Money @deprecated( reason: "DEPRECATED: Will be removed in Saleor 2.10, has been replaced by 'pricing.priceUndiscounted'" )
  • # Informs about variant's availability in the storefront, current
  • # price and discounted price.
  • availability: VariantPricingInfo @deprecated( reason: "DEPRECATED: Will be removed in Saleor 2.10, has been renamed to `pricing`." )
  • # Lists the storefront variant's pricing, the current price and
  • # discounts, only meant for displaying.
  • pricing: VariantPricingInfo
  • # Whether the variant is in stock and visible or not.
  • isAvailable: Boolean
  • # List of attributes assigned to this variant.
  • attributes: [SelectedAttribute!]!
  • # Cost price of the variant.
  • costPrice: Money
  • # Gross margin percentage value.
  • margin: Int
  • # Total quantity ordered.
  • quantityOrdered: Int
  • # Total revenue generated by a variant in given period of time. Note:
  • # this field should be queried using `reportProductSales` query as it
  • # uses optimizations suitable for such calculations.
  • #
  • # Arguments
  • # period:
  • revenue(period: ReportingPeriod): TaxedMoney
  • # List of images for the product variant.
  • images: [ProductImage]
  • # Returns translated Product Variant fields for the given language
  • # code.
  • #
  • # Arguments
  • # languageCode:
  • translation(languageCode: LanguageCodeEnum!): ProductVariantTranslation
  • # Digital content for the product variant.
  • digitalContent: DigitalContent
  • }