Skip to content

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

Fix vague gift card code description

rafiwts025f9bcadaaf
diff --git a/saleor/graphql/giftcard/types.py b/saleor/graphql/giftcard/types.py
index f270e52f68..98e0e96bb5 100644
--- a/saleor/graphql/giftcard/types.py
+++ b/saleor/graphql/giftcard/types.py
@@ -236,9 +236,11 @@ class GiftCard(ModelObjectType[models.GiftCard]):
)
code = graphene.String(
description=(
- "Gift card code. Can be fetched by a staff member with "
- f"{GiftcardPermissions.MANAGE_GIFT_CARD.name} when gift card wasn't yet "
- "used and by the gift card owner."
+ "Gift card code. It can be fetched both by a staff member with "
+ f"'{GiftcardPermissions.MANAGE_GIFT_CARD.name}' when gift card "
+ "hasn't been used yet or a user who bought or issued the gift card."
+ + "\n\nRequires one of the following permissions: "
+ f"{GiftcardPermissions.MANAGE_GIFT_CARD.name}."
),
required=True,
)
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 2800a70a5e..0856a992e6 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -10396,7 +10396,9 @@ type GiftCard implements Node & ObjectWithMetadata @doc(category: "Gift cards")
last4CodeChars: String!
"""
- Gift card code. Can be fetched by a staff member with MANAGE_GIFT_CARD when gift card wasn't yet used and by the gift card owner.
+ Gift card code. It can be fetched both by a staff member with 'MANAGE_GIFT_CARD' when gift card hasn't been used yet or a user who bought or issued the gift card.
+
+ Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
code: String!
created: DateTime!