> Documentation index: [Saleor](/llms.txt) · [This section](/api-reference/gift-cards/llms.txt)
> Source: https://docs.saleor.io/api-reference/gift-cards/queries/gift-cards

# giftCards Query

List of gift cards.

Requires the MANAGE\_GIFT\_CARD permission.

```graphql
giftCards(
  sortBy: GiftCardSortingInput
  filter: GiftCardFilterInput
  search: String
  before: String
  after: String
  first: Int
  last: Int
): GiftCardCountableConnection
```

Details

```graphql
type GiftCardCountableConnection {
  pageInfo: PageInfo!
  edges: [GiftCardCountableEdge!]!
  totalCount: Int
}
```

<a id="arguments"></a>

### Arguments

<a id="sort-by"></a>

#### [`sortBy`](#sort-by) ● [`GiftCardSortingInput`](/api-reference/gift-cards/inputs/gift-card-sorting-input.md)

Sort gift cards.

<a id="filter"></a>

#### [`filter`](#filter) ● [`GiftCardFilterInput`](/api-reference/gift-cards/inputs/gift-card-filter-input.md)

Filtering options for gift cards.

<a id="search"></a>

#### [`search`](#search) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Search gift cards by email and name of user, who created or used the gift card, and by code.

<a id="before"></a>

#### [`before`](#before) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Return the elements in the list that come before the specified cursor.

<a id="after"></a>

#### [`after`](#after) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Return the elements in the list that come after the specified cursor.

<a id="first"></a>

#### [`first`](#first) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

<a id="last"></a>

#### [`last`](#last) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

<a id="type"></a>

### Type

<a id="giftcardcountableconnection"></a>

#### [`GiftCardCountableConnection`](/api-reference/gift-cards/objects/gift-card-countable-connection.md)
