6 December 2022
Composable Commerce
HTTP API
Enhancement
Pricing and DiscountsGraphQLMessages/Subscriptions

You can now subscribe to Messages about adding, changing, setting, and removing Embedded Prices on Products, as well as setting the PriceMode on Products.

Changes:

The following changes were introduced in terms of GraphQL SDL:

type ProductPriceAdded implements MessagePayload {
  variantId: Int!
  price: ProductPrice!
  staged: Boolean!
  hasStagedChanges: Boolean
  type: String!
}

type ProductPriceChanged implements MessagePayload {
  variantId: Int!
  oldPrice: ProductPrice!
  newPrice: ProductPrice!
  staged: Boolean!
  oldStagedPrice: ProductPrice
  hasStagedChanges: Boolean
  type: String!
}

type ProductPriceModeSet implements MessagePayload {
  to: PriceMode
  type: String!
}

type ProductPriceRemoved implements MessagePayload {
  variantId: Int!
  price: ProductPrice!
  staged: Boolean!
  hasStagedChanges: Boolean
  type: String!
}

type ProductPricesSet implements MessagePayload {
  variantId: Int!
  prices: [ProductPrice!]!
  staged: Boolean!
  hasStagedChanges: Boolean
  type: String!
}