27 May 2019
CartsGraphQLPricing and Discounts
Added the
key attribute to CartDiscount. You can use the key attribute when creating or updating a CartDiscount.- [API] Added the
keyattribute to the CartDiscount and CartDiscountDraft representations. - [API] Added the Get CartDiscount by Key, Update CartDiscount by Key, and Delete CartDiscount by Key endpoints.
- [GraphQL API] The GraphQL API now supports queries and mutations of CartDiscount by the
keyattribute. - [GraphQL API] Added the following types to the GraphQL schema:
SetCartDiscountKey. - [GraphQL API] Changed the
CartDiscountDrafttype:- Input field
keywas added toCartDiscountDrafttype
- Input field
- [GraphQL API] Changed the
Querytype:Query.cartDiscount(id)description is changed- Argument
keywas added toQuery.cartDiscountfield Query.cartDiscount(id)type changed fromString!toString
- [GraphQL API] Changed the
CartDiscounttype:- Added the
keyfield to theCartDiscounttype.
- Added the
- [GraphQL API] Changed the
CartDiscountUpdateActiontype:- Input field
setKeywas added toCartDiscountUpdateActiontype
- Input field
- [GraphQL API] Changed the
Mutationtype:Mutation.updateCartDiscount(id)type changed fromString!toStringMutation.deleteCartDiscount(id)description is changed- Argument
keywas added toMutation.updateCartDiscountfield Mutation.deleteCartDiscount(id)type changed fromString!toString- Argument
keywas added toMutation.deleteCartDiscountfield Mutation.updateCartDiscount(id)description is changed
Introduced the following changes to the GraphQL schema (in SDL format):
extend type CartDiscount {
key: String
}
extend input CartDiscountDraft {
key: String
}
extend input CartDiscountUpdateAction {
setKey: SetCartDiscountKey
}
input SetCartDiscountKey {
key: String
}