4 June 2019
GraphQLPricing and DiscountsProduct catalog
Product Discounts now have a user defined
key attribute. You can use the key attribute when querying, updating, or deleting a ProductDiscount.- [API] Added the
keyattribute on theProductDiscountandProductDiscountDraftrepresentations. - [API] You can now get, update, and delete a Product Discount by its key.
- [GraphQL API] Added the following types to the GraphQL schema:
SetProductDiscountKey. - [GraphQL API] Changed the
ProductDiscounttype:- Added the
keyfield to theProductDiscounttype.
- Added the
- [GraphQL API] Changed the
ProductDiscountUpdateActiontype:- Input field
setKeywas added toProductDiscountUpdateActiontype
- Input field
- [GraphQL API] Changed the
Mutationtype:Mutation.updateProductDiscount(id)description is changed- Argument
keywas added toMutation.updateProductDiscountfield Mutation.deleteProductDiscount(id)description is changedMutation.updateProductDiscount(id)type changed fromString!toStringMutation.deleteProductDiscount(id)type changed fromString!toString- Argument
keywas added toMutation.deleteProductDiscountfield
Introduced the following changes to the GraphQL schema (in SDL format):
extend type ProductDiscount {
key: String
}
extend input ProductDiscountUpdateAction {
setKey: SetProductDiscountKey
}
extend input ProductDiscountDraft {
key: String
}
input SetProductDiscountKey {
key: String
}