import { gql } from "@apollo/client";

export const PRODUCT_DETAILED_FRAGMENT = gql`
  fragment ProductDetailed on Product {
    id
    _id
    sku
    type
    name
    urlKey
    description
    shortDescription
    price
    baseImageUrl
    minimumPrice
    specialPrice
    isSaleable
    images {
      edges{
        node {
          id
          path
          publicPath
          position
        }
      }
    }
    productOptions
    flexibleVariants {
      id
      _id
      sku
      variantImages
      optionValues
      quantity
      price
      priceIndices
    }
    variants {
      edges {
        node {
          id
          sku
          baseImageUrl
        }
      }
    }
    reviews {
      edges {
        node {
          id
          _id
          rating
          title
          name
          comment
          createdAt
        }
      }
    }
  }
`;
