Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add missing GraphQL schema input argument deprecations (#18953)
Przemysław Łada20c573a1d9c8
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 27e7bf1753..ecc91e65d2 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -85,3 +85,4 @@ Validation is now performed on the frontend (Dashboard). This change increases v- Deprecate the `hasVariants` field on `ProductType`.- Deprecate export mutations (`exportProducts`, `exportGiftCards`, `exportVoucherCodes`). All data can be fetched via the GraphQL API and parsed into the desired format by apps or external tools.+- Deprecate `voucher` input field on `DraftOrderInput` and `DraftOrderCreateInput`. Use `voucherCode` instead.diff --git a/saleor/graphql/order/mutations/draft_order_create.py b/saleor/graphql/order/mutations/draft_order_create.pyindex 854ea3d52d..0ed9692d0d 100644--- a/saleor/graphql/order/mutations/draft_order_create.py+++ b/saleor/graphql/order/mutations/draft_order_create.py@@ -121,7 +121,8 @@ class DraftOrderInput(BaseInputObjectType):description="ID of a selected shipping method.", name="shippingMethod")voucher = graphene.ID(- description="ID of the voucher associated with the order.",+ description=f"ID of the voucher associated with the order."+ f"{DEPRECATED_IN_3X_INPUT} Use `voucherCode` instead.",name="voucher",deprecation_reason="Use `voucherCode` instead.",)diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex ad772c5d2f..39e8dcadcf 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -27038,7 +27038,7 @@ input DraftOrderCreateInput @doc(category: "Orders") {shippingMethod: ID"""ID of the voucher associated with the order."""- voucher: ID+ voucher: ID @deprecated(reason: "Use `voucherCode` instead.")"""A code of the voucher associated with the order.@@ -27188,7 +27188,7 @@ input DraftOrderInput @doc(category: "Orders") {shippingMethod: ID"""ID of the voucher associated with the order."""- voucher: ID+ voucher: ID @deprecated(reason: "Use `voucherCode` instead.")"""A code of the voucher associated with the order.