Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Set 'localized' field in the Money type as deprecated

IKarbowiake8e1a60762c6
diff --git a/saleor/graphql/core/types/money.py b/saleor/graphql/core/types/money.py
index e1f7c1e6f0..9b10ef01cb 100644
--- a/saleor/graphql/core/types/money.py
+++ b/saleor/graphql/core/types/money.py
@@ -8,7 +8,11 @@ class Money(graphene.ObjectType):
currency = graphene.String(description="Currency code.", required=True)
amount = graphene.Float(description="Amount of money.", required=True)
localized = graphene.String(
- description="Money formatted according to the current locale.", required=True
+ description="Money formatted according to the current locale.",
+ required=True,
+ deprecation_reason="DEPRECATED: Will be removed in Saleor 2.11. "
+ "Price formatting according to the current locale will be "
+ "handled by the frontend client.",
)
class Meta:
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 4d12f342c1..7c3ecdd1e1 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -2004,7 +2004,7 @@ type MetaStore {
type Money {
currency: String!
amount: Float!
- localized: String!
+ localized: String! @deprecated(reason: "DEPRECATED: Will be removed in Saleor 2.11. Price formatting according to the current locale will be handled by the frontend client.")
}
type MoneyRange {