Skip to content
Saleor
Esc
↑↓navigate↵open⌘Jpreview

Schema: Saleor 3.23.43Download SDLUpgrade guides

On this page

giftCardAssignUser Mutation

Restrict a gift card so only the given customer can use it.

Added in Saleor 3.23.

Requires one of the following permissions:MANAGE_GIFT_CARD

Triggers the following webhook events:

  • GIFT_CARD_UPDATED (async): A gift card was updated.

Applied directives

@webhookEventsInfo(asyncEvents: [GIFT_CARD_UPDATED], syncEvents: [])
giftCardAssignUser(id: ID!, userId: ID!): GiftCardAssignUser

Returns

GiftCardAssignUser

Show return type
type GiftCardAssignUser {
  giftCard: GiftCard
  giftCardErrors: [GiftCardError!]! @deprecated(reason: "Use `errors` field instead.")
  errors: [GiftCardError!]!
}

Arguments

id

id · ID!

ID of the gift card.

userId

userId · ID!

ID of the customer to restrict the card to.


Schema: Saleor 3.23.43. Download SDL.

Last updated on July 21, 2026

Was this page helpful?