Chloe 3cdc94d0ce
fix: simplify logic core-charge
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
2024-06-12 10:20:28 +07:00

38 lines
868 B
TypeScript

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}
`;