import productFragment from '../fragments/product'; export const getProductQuery = /* GraphQL */ ` query getProduct($handle: String!) { product(handle: $handle) { ...product } } ${productFragment} `; export const getProductsQuery = /* GraphQL */ ` query getProducts($sortKey: ProductSortKeys, $reverse: Boolean, $query: String, $after: String) { products(sortKey: $sortKey, reverse: $reverse, query: $query, first: 50, after: $after) { edges { node { ...product } } pageInfo { endCursor startCursor hasNextPage } } } ${productFragment} `; export const getProductRecommendationsQuery = /* GraphQL */ ` query getProductRecommendations($productId: ID!) { productRecommendations(productId: $productId) { ...product } } ${productFragment} `; export const getProductVariantQuery = /* GraphQL */ ` query getProductVariant($id: ID!) { node(id: $id) { ... on ProductVariant { id title selectedOptions { name value } coreVariantId: metafield(namespace: "custom", key: "coreVariant") { value } } } } `;