17 January 2020
CartsGraphQLPricing and Discounts
We have made some changes on the GraphQL API that affect referenced resources in product prices, discounts, discount codes, inventory entries and shipping infos.
The reference fields on those resources now support querying for the data stored in referenced objects, similar to Reference Expansion on the HTTP API. The plain reference can now be queried with the corresponding
For backward compatibility reasons, the
The reference fields on those resources now support querying for the data stored in referenced objects, similar to Reference Expansion on the HTTP API. The plain reference can now be queried with the corresponding
<fieldName>Ref field that has been introduced on the mentioned resources. If you, for example for performance reasons, want to continue using the plain references, you should amend your queries to use the corresponding <fieldName>Ref field instead of the <fieldName> field.For backward compatibility reasons, the
typeId field is still available on the <fieldName> queries, but it is now deprecated. It will be removed from the API after April 2020.- [GraphQL API] Changed the 
ProductDiscounttype:- Added the 
referenceRefsfield to theProductDiscounttype. 
 - Added the 
 - [GraphQL API] Changed the 
ProductPricetype:ProductPrice.channelfield type changed fromReferencetoChannelProductPrice.customerGroupfield type changed fromReferencetoCustomerGroup- Added the 
customerGroupReffield to theProductPricetype. - Added the 
channelReffield to theProductPricetype. 
 - [GraphQL API] Changed the 
ShippingInfotype:- Added the 
taxCategoryReffield to theShippingInfotype. ShippingInfo.taxCategoryfield type changed fromReferencetoTaxCategory
 - Added the 
 - [GraphQL API] Changed the 
CartDiscounttype:- Added the 
referenceRefsfield to theCartDiscounttype. 
 - Added the 
 - [GraphQL API] Changed the 
InventoryEntrytype:InventoryEntry.supplyChannelfield type changed fromReferencetoChannel- Added the 
supplyChannelReffield to theInventoryEntrytype. 
 - [GraphQL API] Changed the 
DiscountCodetype:- Added the 
referenceRefsfield to theDiscountCodetype. 
 - Added the 
 
Introduced the following changes to the GraphQL schema (in SDL format):
extend type ProductDiscount {
  referenceRefs: [Reference!]!
}
extend type ProductPrice {
  channelRef: Reference
  customerGroupRef: Reference
}
extend type ShippingInfo {
  taxCategoryRef: Reference
}
extend type CartDiscount {
  referenceRefs: [Reference!]!
}
extend type InventoryEntry {
  supplyChannelRef: Reference
}
extend type DiscountCode {
  referenceRefs: [Reference!]!
}