Magidoc

sale
Query

Look up a sale by ID.

Arguments

#

id

ID !
Non-null

ID of the sale.

Response

#

Returns Sale .

Example

#

    query (
  $id: ID!
  $before: String
  $after: String
  $first: Int
  $last: Int
  $before2: String
  $after2: String
  $first2: Int
  $last2: Int
  $before3: String
  $after3: String
  $first3: Int
  $last3: Int
  $before4: String
  $after4: String
  $first4: Int
  $last4: Int
) {
  sale(id: $id) {
    id
    name
    type
    value
    startDate
    endDate
    currency
    minSpent {
      currency
      baseAmount
    }
    minCheckoutItemsQuantity
    categories(before: $before, after: $after, first: $first, last: $last) {
      totalCount
    }
    collections(
      before: $before2
      after: $after2
      first: $first2
      last: $last2
    ) {
      totalCount
    }
    products(before: $before3, after: $after3, first: $first3, last: $last3) {
      totalCount
    }
    variants(before: $before4, after: $after4, first: $first4, last: $last4) {
      totalCount
    }
    saleType
  }
}

  

3