Skip to content

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

[SALEOR-7006] Deprecate configurationUrl and dataPrivacy fields in apps (#10046)

Tomasz Magulski68bd7c8a2753
diff --git a/saleor/graphql/app/types.py b/saleor/graphql/app/types.py
index 0a51c225f4..53266dc324 100644
--- a/saleor/graphql/app/types.py
+++ b/saleor/graphql/app/types.py
@@ -13,7 +13,7 @@ from ...core.permissions import (
)
from ..account.utils import is_owner_or_has_one_of_perms
from ..core.connection import CountableConnection
-from ..core.descriptions import ADDED_IN_31, PREVIEW_FEATURE
+from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_FIELD, PREVIEW_FEATURE
from ..core.federation import federated_entity, resolve_federation_references
from ..core.types import Job, ModelObjectType, NonNullList, Permission
from ..core.utils import from_global_id_or_error
@@ -157,9 +157,15 @@ class Manifest(graphene.ObjectType):
about = graphene.String()
permissions = NonNullList(Permission)
app_url = graphene.String()
- configuration_url = graphene.String()
+ configuration_url = graphene.String(
+ description="Url to iframe with the configuration for the app.",
+ deprecation_reason=f"{DEPRECATED_IN_3X_FIELD} Use `appUrl` instead.",
+ )
token_target_url = graphene.String()
- data_privacy = graphene.String()
+ data_privacy = graphene.String(
+ description="Description of the data privacy defined for this app.",
+ deprecation_reason=f"{DEPRECATED_IN_3X_FIELD} Use `dataPrivacyUrl` instead.",
+ )
data_privacy_url = graphene.String()
homepage_url = graphene.String()
support_url = graphene.String()
@@ -231,7 +237,8 @@ class App(ModelObjectType):
about_app = graphene.String(description="Description of this app.")
data_privacy = graphene.String(
- description="Description of the data privacy defined for this app."
+ description="Description of the data privacy defined for this app.",
+ deprecation_reason=f"{DEPRECATED_IN_3X_FIELD} Use `dataPrivacyUrl` instead.",
)
data_privacy_url = graphene.String(
description="Url to details about the privacy policy on the app owner page."
@@ -239,7 +246,8 @@ class App(ModelObjectType):
homepage_url = graphene.String(description="Homepage of the app.")
support_url = graphene.String(description="Support page for the app.")
configuration_url = graphene.String(
- description="Url to iframe with the configuration for the app."
+ description="Url to iframe with the configuration for the app.",
+ deprecation_reason=f"{DEPRECATED_IN_3X_FIELD} Use `appUrl` instead.",
)
app_url = graphene.String(description="Url to iframe with the app.")
version = graphene.String(description="Version number of the app.")
diff --git a/saleor/graphql/checkout/schema.py b/saleor/graphql/checkout/schema.py
index 6723069a76..7e63cf7473 100644
--- a/saleor/graphql/checkout/schema.py
+++ b/saleor/graphql/checkout/schema.py
@@ -105,8 +105,7 @@ class CheckoutMutations(graphene.ObjectType):
checkout_email_update = CheckoutEmailUpdate.Field()
checkout_line_delete = CheckoutLineDelete.Field(
deprecation_reason=(
- "DEPRECATED: Will be removed in Saleor 4.0. "
- "Use `checkoutLinesDelete` instead."
+ f"{DEPRECATED_IN_3X_FIELD} Use `checkoutLinesDelete` instead."
)
)
checkout_lines_delete = CheckoutLinesDelete.Field()
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 8682dfb576..0be5338967 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -1933,7 +1933,7 @@ type App implements Node & ObjectWithMetadata {
aboutApp: String
"""Description of the data privacy defined for this app."""
- dataPrivacy: String
+ dataPrivacy: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use `dataPrivacyUrl` instead.")
"""Url to details about the privacy policy on the app owner page."""
dataPrivacyUrl: String
@@ -1945,7 +1945,7 @@ type App implements Node & ObjectWithMetadata {
supportUrl: String
"""Url to iframe with the configuration for the app."""
- configurationUrl: String
+ configurationUrl: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use `appUrl` instead.")
"""Url to iframe with the app."""
appUrl: String
@@ -12844,7 +12844,7 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutLineDelete @deprecated(reason: "DEPRECATED: Will be removed in Saleor 4.0. Use `checkoutLinesDelete` instead.")
+ ): CheckoutLineDelete @deprecated(reason: "This field will be removed in Saleor 4.0. Use `checkoutLinesDelete` instead.")
"""Deletes checkout lines."""
checkoutLinesDelete(
@@ -19859,9 +19859,13 @@ type Manifest {
about: String
permissions: [Permission!]
appUrl: String
- configurationUrl: String
+
+ """Url to iframe with the configuration for the app."""
+ configurationUrl: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use `appUrl` instead.")
tokenTargetUrl: String
- dataPrivacy: String
+
+ """Description of the data privacy defined for this app."""
+ dataPrivacy: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use `dataPrivacyUrl` instead.")
dataPrivacyUrl: String
homepageUrl: String
supportUrl: String
diff --git a/saleor/graphql/shipping/types.py b/saleor/graphql/shipping/types.py
index 010e13403c..03eaa2ba5f 100644
--- a/saleor/graphql/shipping/types.py
+++ b/saleor/graphql/shipping/types.py
@@ -315,12 +315,12 @@ class ShippingMethod(graphene.ObjectType):
maximum_order_weight = graphene.Field(
Weight,
description="Maximum order weight for this shipping method.",
- deprecation_reason="This field will be removed in Saleor 4.0.",
+ deprecation_reason=DEPRECATED_IN_3X_FIELD,
)
minimum_order_weight = graphene.Field(
Weight,
description="Minimum order weight for this shipping method.",
- deprecation_reason="This field will be removed in Saleor 4.0.",
+ deprecation_reason=DEPRECATED_IN_3X_FIELD,
)
translation = TranslationField(
ShippingMethodTranslation,