import { channelListingProductFragment } from "@saleor/fragments/products";
import gql from "graphql-tag";
import { pageInfoFragment } from "./pageInfo";
export const saleFragment = gql`
fragment SaleFragment on Sale {
id
name
type
startDate
endDate
channelListings {
channel {
currencyCode
}
discountValue
currency
`;
export const saleDetailsFragment = gql`
${channelListingProductFragment}
${pageInfoFragment}
${saleFragment}
fragment SaleDetailsFragment on Sale {
...SaleFragment
products(after: $after, before: $before, first: $first, last: $last) {
edges {
node {
productType {
thumbnail {
url
...ChannelListingProductFragment
pageInfo {
...PageInfoFragment
totalCount
categories(after: $after, before: $before, first: $first, last: $last) {
products {
collections(after: $after, before: $before, first: $first, last: $last) {
export const voucherFragment = gql`
fragment VoucherFragment on Voucher {
code
usageLimit
discountValueType
countries {
country
minCheckoutItemsQuantity
minSpent {
amount
export const voucherDetailsFragment = gql`
${voucherFragment}
fragment VoucherDetailsFragment on Voucher {
...VoucherFragment
used
applyOncePerOrder
applyOncePerCustomer