Skip to content

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

Add preview labels (#9214)

Marcin Gębalab649a2fdeb56
diff --git a/saleor/graphql/app/schema.py b/saleor/graphql/app/schema.py
index 1144b32bd3..9d1c218e6b 100644
--- a/saleor/graphql/app/schema.py
+++ b/saleor/graphql/app/schema.py
@@ -2,7 +2,7 @@ import graphene
from ...core.permissions import AppPermission
from ..core.connection import create_connection_slice, filter_connection_queryset
-from ..core.descriptions import ADDED_IN_31
+from ..core.descriptions import ADDED_IN_31, PREVIEW_FEATURE
from ..core.fields import FilterConnectionField
from ..core.types import FilterInputObjectType
from ..core.utils import from_global_id_or_error
@@ -75,14 +75,14 @@ class AppQueries(graphene.ObjectType):
filter=AppExtensionFilterInput(
description="Filtering options for apps extensions."
),
- description=f"{ADDED_IN_31} List of all extensions",
+ description=f"{ADDED_IN_31} List of all extensions. {PREVIEW_FEATURE}",
)
app_extension = graphene.Field(
AppExtension,
id=graphene.Argument(
graphene.ID, description="ID of the app extension.", required=True
),
- description=f"{ADDED_IN_31} Look up an app extension by ID.",
+ description=f"{ADDED_IN_31} Look up an app extension by ID. {PREVIEW_FEATURE}",
)
@permission_required(AppPermission.MANAGE_APPS)
diff --git a/saleor/graphql/app/types.py b/saleor/graphql/app/types.py
index 5b266cd4b1..332dfbf6da 100644
--- a/saleor/graphql/app/types.py
+++ b/saleor/graphql/app/types.py
@@ -8,7 +8,7 @@ from ...app.types import AppExtensionTarget
from ...core.exceptions import PermissionDenied
from ...core.permissions import AppPermission
from ..core.connection import CountableConnection
-from ..core.descriptions import ADDED_IN_31
+from ..core.descriptions import ADDED_IN_31, PREVIEW_FEATURE
from ..core.federation import resolve_federation_references
from ..core.types import ModelObjectType, Permission
from ..core.types.common import Job
@@ -202,7 +202,7 @@ class App(ModelObjectType):
)
extensions = graphene.List(
graphene.NonNull(AppExtension),
- description=f"{ADDED_IN_31} App's dashboard extensions.",
+ description=f"{ADDED_IN_31} App's dashboard extensions. {PREVIEW_FEATURE}",
required=True,
)
diff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.py
index 6243520be0..8485b402cc 100644
--- a/saleor/graphql/checkout/mutations.py
+++ b/saleor/graphql/checkout/mutations.py
@@ -55,6 +55,7 @@ from ..core.descriptions import (
ADDED_IN_31,
DEPRECATED_IN_3X_FIELD,
DEPRECATED_IN_3X_INPUT,
+ PREVIEW_FEATURE,
)
from ..core.enums import LanguageCodeEnum
from ..core.mutations import BaseMutation, ModelMutation
@@ -1401,7 +1402,7 @@ class CheckoutDeliveryMethodUpdate(BaseMutation):
class Meta:
description = (
f"{ADDED_IN_31} Updates the delivery method "
- "(shipping method or pick up point) of the checkout."
+ f"(shipping method or pick up point) of the checkout. {PREVIEW_FEATURE}"
)
error_type_class = CheckoutError
diff --git a/saleor/graphql/checkout/types.py b/saleor/graphql/checkout/types.py
index 522ca97e37..87d982ce49 100644
--- a/saleor/graphql/checkout/types.py
+++ b/saleor/graphql/checkout/types.py
@@ -16,7 +16,7 @@ from ..channel import ChannelContext
from ..channel.dataloaders import ChannelByCheckoutLineIDLoader, ChannelByIdLoader
from ..channel.types import Channel
from ..core.connection import CountableConnection
-from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_FIELD
+from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_FIELD, PREVIEW_FEATURE
from ..core.enums import LanguageCodeEnum
from ..core.scalars import UUID
from ..core.types import ModelObjectType, Money, TaxedMoney
@@ -170,7 +170,7 @@ class DeliveryMethod(graphene.Union):
description = (
f"{ADDED_IN_31} Represents a delivery method chosen for the checkout. "
'`Warehouse` type is used when checkout is marked as "click and collect" '
- "and `ShippingMethod` otherwise."
+ f"and `ShippingMethod` otherwise. {PREVIEW_FEATURE}"
)
types = (Warehouse, ShippingMethod)
@@ -211,7 +211,10 @@ class Checkout(ModelObjectType):
available_collection_points = graphene.List(
graphene.NonNull(Warehouse),
required=True,
- description=f"{ADDED_IN_31} Collection points that can be used for this order.",
+ description=(
+ f"{ADDED_IN_31} Collection points that can be used for this order. "
+ f"{PREVIEW_FEATURE}"
+ ),
)
available_payment_gateways = graphene.List(
graphene.NonNull(PaymentGateway),
@@ -251,7 +254,10 @@ class Checkout(ModelObjectType):
delivery_method = graphene.Field(
DeliveryMethod,
- description=f"{ADDED_IN_31} The delivery method selected for this checkout.",
+ description=(
+ f"{ADDED_IN_31} The delivery method selected for this checkout. "
+ f"{PREVIEW_FEATURE}"
+ ),
)
subtotal_price = graphene.Field(
diff --git a/saleor/graphql/core/descriptions.py b/saleor/graphql/core/descriptions.py
index 7c5b66162e..8f3e639bad 100644
--- a/saleor/graphql/core/descriptions.py
+++ b/saleor/graphql/core/descriptions.py
@@ -8,3 +8,7 @@ DEPRECATED_IN_3X_INPUT = "\n\nDEPRECATED: this field will be removed in Saleor 4
ADDED_IN_31 = "New in Saleor 3.1."
+PREVIEW_FEATURE = (
+ "Note: this feature is in a preview state and can be subject to changes at later "
+ "point."
+)
diff --git a/saleor/graphql/csv/mutations.py b/saleor/graphql/csv/mutations.py
index d3491a9091..1017de0b4f 100644
--- a/saleor/graphql/csv/mutations.py
+++ b/saleor/graphql/csv/mutations.py
@@ -9,7 +9,7 @@ from ...csv.events import export_started_event
from ...csv.tasks import export_gift_cards_task, export_products_task
from ..attribute.types import Attribute
from ..channel.types import Channel
-from ..core.descriptions import ADDED_IN_31
+from ..core.descriptions import ADDED_IN_31, PREVIEW_FEATURE
from ..core.enums import ExportErrorCode
from ..core.mutations import BaseMutation
from ..core.types.common import ExportError
@@ -188,7 +188,7 @@ class ExportGiftCards(BaseExportMutation):
)
class Meta:
- description = f"{ADDED_IN_31} Export gift cards to csv file."
+ description = f"{ADDED_IN_31} Export gift cards to csv file. {PREVIEW_FEATURE}"
permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)
error_type_class = ExportError
diff --git a/saleor/graphql/giftcard/bulk_mutations.py b/saleor/graphql/giftcard/bulk_mutations.py
index 67c4b3970c..58ec508c0a 100644
--- a/saleor/graphql/giftcard/bulk_mutations.py
+++ b/saleor/graphql/giftcard/bulk_mutations.py
@@ -10,7 +10,7 @@ from ...core.utils.validators import is_date_in_future
from ...giftcard import events, models
from ...giftcard.error_codes import GiftCardErrorCode
from ...giftcard.utils import is_gift_card_expired
-from ..core.descriptions import ADDED_IN_31
+from ..core.descriptions import ADDED_IN_31, PREVIEW_FEATURE
from ..core.mutations import BaseBulkMutation, BaseMutation, ModelBulkDeleteMutation
from ..core.types.common import GiftCardError, PriceInput
from ..core.validators import validate_price_precision
@@ -52,7 +52,7 @@ class GiftCardBulkCreate(BaseMutation):
)
class Meta:
- description = f"{ADDED_IN_31} Create gift cards."
+ description = f"{ADDED_IN_31} Create gift cards. {PREVIEW_FEATURE}"
model = models.GiftCard
permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)
error_type_class = GiftCardError
@@ -155,7 +155,7 @@ class GiftCardBulkDelete(ModelBulkDeleteMutation):
)
class Meta:
- description = f"{ADDED_IN_31} Delete gift cards."
+ description = f"{ADDED_IN_31} Delete gift cards. {PREVIEW_FEATURE}"
model = models.GiftCard
object_type = GiftCard
permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)
@@ -169,7 +169,7 @@ class GiftCardBulkActivate(BaseBulkMutation):
)
class Meta:
- description = f"{ADDED_IN_31} Activate gift cards."
+ description = f"{ADDED_IN_31} Activate gift cards. {PREVIEW_FEATURE}"
model = models.GiftCard
object_type = GiftCard
permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)
@@ -203,7 +203,7 @@ class GiftCardBulkDeactivate(BaseBulkMutation):
)
class Meta:
- description = f"{ADDED_IN_31} Deactivate gift cards."
+ description = f"{ADDED_IN_31} Deactivate gift cards. {PREVIEW_FEATURE}"
model = models.GiftCard
object_type = GiftCard
permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)
diff --git a/saleor/graphql/giftcard/mutations.py b/saleor/graphql/giftcard/mutations.py
index dc3fd9a731..be49ebb55e 100644
--- a/saleor/graphql/giftcard/mutations.py
+++ b/saleor/graphql/giftcard/mutations.py
@@ -18,7 +18,7 @@ from ...giftcard.utils import (
deactivate_gift_card,
is_gift_card_expired,
)
-from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_INPUT
+from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_INPUT, PREVIEW_FEATURE
from ..core.mutations import BaseMutation, ModelDeleteMutation, ModelMutation
from ..core.scalars import PositiveDecimal
from ..core.types.common import GiftCardError, PriceInput
@@ -43,10 +43,10 @@ def clean_gift_card(gift_card: GiftCard):
class GiftCardInput(graphene.InputObjectType):
add_tags = graphene.List(
graphene.NonNull(graphene.String),
- description=f"{ADDED_IN_31} The gift card tags to add.",
+ description=f"{ADDED_IN_31} The gift card tags to add. {PREVIEW_FEATURE}",
)
expiry_date = graphene.types.datetime.Date(
- description=f"{ADDED_IN_31} The gift card expiry date."
+ description=f"{ADDED_IN_31} The gift card expiry date. {PREVIEW_FEATURE}"
)
# DEPRECATED
@@ -73,11 +73,15 @@ class GiftCardCreateInput(GiftCardInput):
)
channel = graphene.String(
description=(
- f"{ADDED_IN_31} Slug of a channel from which the email should be sent."
+ f"{ADDED_IN_31} Slug of a channel from which the email should be sent. "
+ f"{PREVIEW_FEATURE}"
)
)
is_active = graphene.Boolean(
- required=True, description=f"{ADDED_IN_31} Determine if gift card is active."
+ required=True,
+ description=(
+ f"{ADDED_IN_31} Determine if gift card is active. {PREVIEW_FEATURE}"
+ ),
)
code = graphene.String(
required=False,
@@ -87,17 +91,21 @@ class GiftCardCreateInput(GiftCardInput):
),
)
note = graphene.String(
- description=f"{ADDED_IN_31} The gift card note from the staff member."
+ description=(
+ f"{ADDED_IN_31} The gift card note from the staff member. "
+ f"{PREVIEW_FEATURE}"
+ )
)
class GiftCardUpdateInput(GiftCardInput):
remove_tags = graphene.List(
graphene.NonNull(graphene.String),
- description=f"{ADDED_IN_31} The gift card tags to remove.",
+ description=f"{ADDED_IN_31} The gift card tags to remove. {PREVIEW_FEATURE}",
)
balance_amount = PositiveDecimal(
- description=f"{ADDED_IN_31} The gift card balance amount.", required=False
+ description=f"{ADDED_IN_31} The gift card balance amount. {PREVIEW_FEATURE}",
+ required=False,
)
@@ -358,7 +366,7 @@ class GiftCardDelete(ModelDeleteMutation):
id = graphene.ID(description="ID of the gift card to delete.", required=True)
class Meta:
- description = f"{ADDED_IN_31} Delete gift card."
+ description = f"{ADDED_IN_31} Delete gift card. {PREVIEW_FEATURE}"
model = models.GiftCard
object_type = GiftCard
permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)
@@ -443,7 +451,7 @@ class GiftCardResend(BaseMutation):
)
class Meta:
- description = f"{ADDED_IN_31} Resend a gift card."
+ description = f"{ADDED_IN_31} Resend a gift card. {PREVIEW_FEATURE}"
permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)
error_type_class = GiftCardError
@@ -519,7 +527,7 @@ class GiftCardAddNote(BaseMutation):
)
class Meta:
- description = f"{ADDED_IN_31} Adds note to the gift card."
+ description = f"{ADDED_IN_31} Adds note to the gift card. {PREVIEW_FEATURE}"
permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)
error_type_class = GiftCardError
diff --git a/saleor/graphql/giftcard/schema.py b/saleor/graphql/giftcard/schema.py
index 1c95117dcc..ecada4bbd7 100644
--- a/saleor/graphql/giftcard/schema.py
+++ b/saleor/graphql/giftcard/schema.py
@@ -4,7 +4,7 @@ from graphql.error import GraphQLError
from ...core.permissions import GiftcardPermissions
from ...giftcard import models
from ..core.connection import create_connection_slice, filter_connection_queryset
-from ..core.descriptions import ADDED_IN_31
+from ..core.descriptions import ADDED_IN_31, PREVIEW_FEATURE
from ..core.fields import FilterConnectionField
from ..core.utils import from_global_id_or_error
from ..decorators import permission_required
@@ -39,15 +39,19 @@ class GiftCardQueries(graphene.ObjectType):
)
gift_cards = FilterConnectionField(
GiftCardCountableConnection,
- sort_by=GiftCardSortingInput(description=f"{ADDED_IN_31} Sort gift cards."),
+ sort_by=GiftCardSortingInput(
+ description=f"{ADDED_IN_31} Sort gift cards. {PREVIEW_FEATURE}"
+ ),
filter=GiftCardFilterInput(
- description=f"{ADDED_IN_31} Filtering options for gift cards."
+ description=(
+ f"{ADDED_IN_31} Filtering options for gift cards. {PREVIEW_FEATURE}"
+ )
),
description="List of gift cards.",
)
gift_card_currencies = graphene.Field(
graphene.List(graphene.NonNull(graphene.String)),
- description=f"{ADDED_IN_31} List of gift card currencies.",
+ description=f"{ADDED_IN_31} List of gift card currencies. {PREVIEW_FEATURE}",
required=True,
)
gift_card_tags = FilterConnectionField(
@@ -55,7 +59,7 @@ class GiftCardQueries(graphene.ObjectType):
filter=GiftCardTagFilterInput(
description="Filtering options for gift card tags."
),
- description="{ADDED_IN_31} List of gift card tags.",
+ description=f"{ADDED_IN_31} List of gift card tags. {PREVIEW_FEATURE}",
)
@permission_required(GiftcardPermissions.MANAGE_GIFT_CARD)
diff --git a/saleor/graphql/giftcard/types.py b/saleor/graphql/giftcard/types.py
index 739d979d7e..fc3d7e34ed 100644
--- a/saleor/graphql/giftcard/types.py
+++ b/saleor/graphql/giftcard/types.py
@@ -16,7 +16,7 @@ from ..app.types import App
from ..channel import ChannelContext
from ..channel.dataloaders import ChannelByIdLoader
from ..core.connection import CountableConnection
-from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_FIELD
+from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_FIELD, PREVIEW_FEATURE
from ..core.types import ModelObjectType, Money
from ..decorators import permission_required
from ..meta.types import ObjectWithMetadata
@@ -91,7 +91,7 @@ class GiftCardEvent(ModelObjectType):
)
class Meta:
- description = f"{ADDED_IN_31} History log of the gift card."
+ description = f"{ADDED_IN_31} History log of the gift card. {PREVIEW_FEATURE}"
model = models.GiftCardEvent
interfaces = [graphene.relay.Node]
@@ -191,7 +191,7 @@ class GiftCardTag(ModelObjectType):
name = graphene.String(required=True)
class Meta:
- description = f"{ADDED_IN_31} The gift card tag."
+ description = f"{ADDED_IN_31} The gift card tag. {PREVIEW_FEATURE}"
model = models.GiftCardTag
interfaces = [graphene.relay.Node]
@@ -217,50 +217,61 @@ class GiftCard(ModelObjectType):
created = graphene.DateTime(required=True)
created_by = graphene.Field(
"saleor.graphql.account.types.User",
- description=f"{ADDED_IN_31} The user who bought or issued a gift card.",
+ description=(
+ f"{ADDED_IN_31} The user who bought or issued a gift card. "
+ f"{PREVIEW_FEATURE}"
+ ),
)
used_by = graphene.Field(
"saleor.graphql.account.types.User",
- description=f"{ADDED_IN_31} The customer who used a gift card.",
+ description=(
+ f"{ADDED_IN_31} The customer who used a gift card. {PREVIEW_FEATURE}"
+ ),
)
created_by_email = graphene.String(
required=False,
description=(
- f"{ADDED_IN_31} Email address of the user who bought or issued gift card."
+ f"{ADDED_IN_31} Email address of the user who bought or issued gift card. "
+ f"{PREVIEW_FEATURE}"
),
)
used_by_email = graphene.String(
required=False,
description=(
- f"{ADDED_IN_31} Email address of the customer who used a gift card."
+ f"{ADDED_IN_31} Email address of the customer who used a gift card. "
+ f"{PREVIEW_FEATURE}"
),
)
last_used_on = graphene.DateTime()
expiry_date = graphene.Date()
app = graphene.Field(
App,
- description=f"{ADDED_IN_31} App which created the gift card.",
+ description=f"{ADDED_IN_31} App which created the gift card. {PREVIEW_FEATURE}",
)
product = graphene.Field(
"saleor.graphql.product.types.products.Product",
- description=f"{ADDED_IN_31} Related gift card product.",
+ description=f"{ADDED_IN_31} Related gift card product. {PREVIEW_FEATURE}",
)
events = graphene.List(
graphene.NonNull(GiftCardEvent),
filter=GiftCardEventFilterInput(
description="Filtering options for gift card events."
),
- description=f"{ADDED_IN_31} List of events associated with the gift card.",
+ description=(
+ f"{ADDED_IN_31} List of events associated with the gift card. "
+ f"{PREVIEW_FEATURE}"
+ ),
required=True,
)
tags = graphene.List(
graphene.NonNull(GiftCardTag),
- description=f"{ADDED_IN_31} The gift card tag.",
+ description=f"{ADDED_IN_31} The gift card tag. {PREVIEW_FEATURE}",
required=True,
)
bought_in_channel = graphene.String(
description=(
- "{ADDED_IN_31} Slug of the channel where the gift card was bought."
+ f"{ADDED_IN_31} Slug of the channel where the gift card was bought. "
+ f"{PREVIEW_FEATURE}"
),
required=False,
)
diff --git a/saleor/graphql/order/types.py b/saleor/graphql/order/types.py
index 43e8d755e7..a75a3d1959 100644
--- a/saleor/graphql/order/types.py
+++ b/saleor/graphql/order/types.py
@@ -54,7 +54,7 @@ from ..channel import ChannelContext
from ..channel.dataloaders import ChannelByIdLoader, ChannelByOrderLineIdLoader
from ..channel.types import Channel
from ..core.connection import CountableConnection
-from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_FIELD
+from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_FIELD, PREVIEW_FEATURE
from ..core.enums import LanguageCodeEnum
from ..core.mutations import validation_error_to_error_type
from ..core.scalars import PositiveDecimal
@@ -656,7 +656,10 @@ class Order(ModelObjectType):
available_collection_points = graphene.List(
graphene.NonNull(Warehouse),
required=True,
- description=f"{ADDED_IN_31} Collection points that can be used for this order.",
+ description=(
+ f"{ADDED_IN_31} Collection points that can be used for this order. "
+ f"{PREVIEW_FEATURE}"
+ ),
)
invoices = graphene.List(
Invoice, required=False, description="List of order invoices."
@@ -739,7 +742,10 @@ class Order(ModelObjectType):
)
delivery_method = graphene.Field(
DeliveryMethod,
- description=f"{ADDED_IN_31} The delivery method selected for this checkout.",
+ description=(
+ f"{ADDED_IN_31} The delivery method selected for this checkout. "
+ f"{PREVIEW_FEATURE}"
+ ),
)
language_code = graphene.String(
deprecation_reason=(
diff --git a/saleor/graphql/product/mutations/channels.py b/saleor/graphql/product/mutations/channels.py
index 962ab22e3b..a0f04ff7f7 100644
--- a/saleor/graphql/product/mutations/channels.py
+++ b/saleor/graphql/product/mutations/channels.py
@@ -20,7 +20,7 @@ from ....product.tasks import update_product_discounted_price_task
from ...channel import ChannelContext
from ...channel.mutations import BaseChannelListingMutation
from ...channel.types import Channel
-from ...core.descriptions import ADDED_IN_31
+from ...core.descriptions import ADDED_IN_31, PREVIEW_FEATURE
from ...core.mutations import BaseMutation
from ...core.scalars import PositiveDecimal
from ...core.types.common import (
@@ -307,7 +307,10 @@ class ProductVariantChannelListingAddInput(graphene.InputObjectType):
)
cost_price = PositiveDecimal(description="Cost price of the variant in channel.")
preorder_threshold = graphene.Int(
- description=f"{ADDED_IN_31} The threshold for preorder variant in channel."
+ description=(
+ f"{ADDED_IN_31} The threshold for preorder variant in channel. "
+ f"{PREVIEW_FEATURE}"
+ )
)
diff --git a/saleor/graphql/product/mutations/products.py b/saleor/graphql/product/mutations/products.py
index 10992c015d..deffad9903 100644
--- a/saleor/graphql/product/mutations/products.py
+++ b/saleor/graphql/product/mutations/products.py
@@ -41,7 +41,7 @@ from ....warehouse.management import deactivate_preorder_for_variant
from ...attribute.types import AttributeValueInput
from ...attribute.utils import AttributeAssignmentMixin, AttrValuesInput
from ...channel import ChannelContext
-from ...core.descriptions import ADDED_IN_31
+from ...core.descriptions import ADDED_IN_31, PREVIEW_FEATURE
from ...core.inputs import ReorderInput
from ...core.mutations import BaseMutation, ModelDeleteMutation, ModelMutation
from ...core.scalars import WeightScalar
@@ -804,13 +804,15 @@ class ProductVariantInput(graphene.InputObjectType):
)
weight = WeightScalar(description="Weight of the Product Variant.", required=False)
preorder = PreorderSettingsInput(
- description=f"{ADDED_IN_31} Determines if variant is in preorder."
+ description=(
+ f"{ADDED_IN_31} Determines if variant is in preorder. {PREVIEW_FEATURE}"
+ )
)
quantity_limit_per_customer = graphene.Int(
required=False,
description=(
f"{ADDED_IN_31} Determines maximum quantity of `ProductVariant`,"
- "that can be bought in a single checkout."
+ f"that can be bought in a single checkout. {PREVIEW_FEATURE}"
),
)
@@ -1835,8 +1837,9 @@ class ProductVariantPreorderDeactivate(BaseMutation):
class Meta:
description = (
- f"{ADDED_IN_31} Deactivates product variant preorder."
- "It changes all preorder allocation into regular allocation."
+ f"{ADDED_IN_31} Deactivates product variant preorder. "
+ f"It changes all preorder allocation into regular allocation. "
+ f"{PREVIEW_FEATURE}"
)
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ProductError
diff --git a/saleor/graphql/product/types/channels.py b/saleor/graphql/product/types/channels.py
index aa957cbb9e..57f50af336 100644
--- a/saleor/graphql/product/types/channels.py
+++ b/saleor/graphql/product/types/channels.py
@@ -16,7 +16,7 @@ from ....product.utils.costs import (
from ...account import types as account_types
from ...channel.dataloaders import ChannelByIdLoader
from ...channel.types import Channel
-from ...core.descriptions import ADDED_IN_31
+from ...core.descriptions import ADDED_IN_31, PREVIEW_FEATURE
from ...core.types import ModelObjectType
from ...decorators import permission_required
from ...discount.dataloaders import DiscountsByDateTimeLoader
@@ -256,7 +256,7 @@ class ProductVariantChannelListing(ModelObjectType):
preorder_threshold = graphene.Field(
PreorderThreshold,
required=False,
- description=f"{ADDED_IN_31} Preorder variant data.",
+ description=f"{ADDED_IN_31} Preorder variant data. {PREVIEW_FEATURE}",
)
class Meta:
diff --git a/saleor/graphql/product/types/products.py b/saleor/graphql/product/types/products.py
index a9af3ac577..68479c376b 100644
--- a/saleor/graphql/product/types/products.py
+++ b/saleor/graphql/product/types/products.py
@@ -50,6 +50,7 @@ from ...core.descriptions import (
ADDED_IN_31,
DEPRECATED_IN_3X_FIELD,
DEPRECATED_IN_3X_INPUT,
+ PREVIEW_FEATURE,
)
from ...core.enums import ReportingPeriod
from ...core.federation import resolve_federation_references
@@ -316,7 +317,9 @@ class ProductVariant(ChannelContextTypeWithMetadata, ModelObjectType):
preorder = graphene.Field(
PreorderData,
required=False,
- description=f"{ADDED_IN_31} Preorder data for product variant.",
+ description=(
+ f"{ADDED_IN_31} Preorder data for product variant. {PREVIEW_FEATURE}"
+ ),
)
class Meta:
diff --git a/saleor/graphql/shop/mutations.py b/saleor/graphql/shop/mutations.py
index 93cc370da0..07536b4127 100644
--- a/saleor/graphql/shop/mutations.py
+++ b/saleor/graphql/shop/mutations.py
@@ -10,7 +10,7 @@ from ...site.error_codes import GiftCardSettingsErrorCode
from ...site.models import DEFAULT_LIMIT_QUANTITY_PER_CHECKOUT
from ..account.i18n import I18nMixin
from ..account.types import AddressInput, StaffNotificationRecipient
-from ..core.descriptions import ADDED_IN_31
+from ..core.descriptions import ADDED_IN_31, PREVIEW_FEATURE
from ..core.enums import WeightUnitsEnum
from ..core.mutations import BaseMutation, ModelDeleteMutation, ModelMutation
from ..core.types.common import (
@@ -77,7 +77,7 @@ class ShopSettingsInput(graphene.InputObjectType):
description=(
f"{ADDED_IN_31} Default number of maximum line quantity "
"in single checkout. Minimum possible value is 1, default "
- f"value is {DEFAULT_LIMIT_QUANTITY_PER_CHECKOUT}."
+ f"value is {DEFAULT_LIMIT_QUANTITY_PER_CHECKOUT}. {PREVIEW_FEATURE}"
)
)
diff --git a/saleor/graphql/shop/types.py b/saleor/graphql/shop/types.py
index 190819ed11..5a0962f628 100644
--- a/saleor/graphql/shop/types.py
+++ b/saleor/graphql/shop/types.py
@@ -14,7 +14,7 @@ from ...core.tracing import traced_resolver
from ...site import models as site_models
from ..account.types import Address, AddressInput, StaffNotificationRecipient
from ..checkout.types import PaymentGateway
-from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_INPUT
+from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_INPUT, PREVIEW_FEATURE
from ..core.enums import LanguageCodeEnum, WeightUnitsEnum
from ..core.types import ModelObjectType
from ..core.types.common import CountryDisplay, LanguageDisplay, Permission, TimePeriod
@@ -231,11 +231,10 @@ class Shop(graphene.ObjectType):
"authenticated checkout or null when stock reservation is disabled."
)
)
-
limit_quantity_per_checkout = graphene.Int(
description=(
f"{ADDED_IN_31} Default number of maximum line quantity in single checkout "
- "(per single checkout line)."
+ f"(per single checkout line). {PREVIEW_FEATURE}"
)
)
diff --git a/saleor/graphql/warehouse/types.py b/saleor/graphql/warehouse/types.py
index e21d0059a3..5979a2017a 100644
--- a/saleor/graphql/warehouse/types.py
+++ b/saleor/graphql/warehouse/types.py
@@ -9,7 +9,7 @@ from ...warehouse.reservations import is_reservation_enabled
from ..account.dataloaders import AddressByIdLoader
from ..channel import ChannelContext
from ..core.connection import CountableConnection, create_connection_slice
-from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_FIELD
+from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_FIELD, PREVIEW_FEATURE
from ..core.fields import ConnectionField
from ..core.types import ModelObjectType
from ..decorators import one_of_permissions_required
@@ -42,11 +42,15 @@ class WarehouseUpdateInput(WarehouseInput):
required=False,
)
click_and_collect_option = WarehouseClickAndCollectOptionEnum(
- description=f"{ADDED_IN_31} Click and collect options: local, all or disabled",
+ description=(
+ f"{ADDED_IN_31} Click and collect options: local, all or disabled. "
+ f"{PREVIEW_FEATURE}"
+ ),
required=False,
)
is_private = graphene.Boolean(
- description=f"{ADDED_IN_31} Visibility of warehouse stocks", required=False
+ description=f"{ADDED_IN_31} Visibility of warehouse stocks. {PREVIEW_FEATURE}",
+ required=False,
)
@@ -65,7 +69,10 @@ class Warehouse(ModelObjectType):
),
)
click_and_collect_option = WarehouseClickAndCollectOptionEnum(
- description=f"{ADDED_IN_31} Click and collect options: local, all or disabled",
+ description=(
+ f"{ADDED_IN_31} Click and collect options: local, all or disabled. "
+ f"{PREVIEW_FEATURE}"
+ ),
required=True,
)
shipping_zones = ConnectionField(