mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 05:56:59 +00:00
lib/shopify: add collection names to product query fragment
This commit is contained in:
parent
f54c0cfe65
commit
087c5ecb93
@ -2,63 +2,69 @@ import imageFragment from './image';
|
|||||||
import seoFragment from './seo';
|
import seoFragment from './seo';
|
||||||
|
|
||||||
const productFragment = /* GraphQL */ `
|
const productFragment = /* GraphQL */ `
|
||||||
fragment product on Product {
|
fragment product on Product {
|
||||||
id
|
id
|
||||||
handle
|
handle
|
||||||
availableForSale
|
availableForSale
|
||||||
title
|
title
|
||||||
description
|
description
|
||||||
descriptionHtml
|
descriptionHtml
|
||||||
options {
|
options {
|
||||||
id
|
id
|
||||||
name
|
|
||||||
values
|
|
||||||
}
|
|
||||||
priceRange {
|
|
||||||
maxVariantPrice {
|
|
||||||
amount
|
|
||||||
currencyCode
|
|
||||||
}
|
|
||||||
minVariantPrice {
|
|
||||||
amount
|
|
||||||
currencyCode
|
|
||||||
}
|
|
||||||
}
|
|
||||||
variants(first: 250) {
|
|
||||||
edges {
|
|
||||||
node {
|
|
||||||
id
|
|
||||||
title
|
|
||||||
availableForSale
|
|
||||||
selectedOptions {
|
|
||||||
name
|
name
|
||||||
value
|
values
|
||||||
}
|
|
||||||
price {
|
|
||||||
amount
|
|
||||||
currencyCode
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
priceRange {
|
||||||
}
|
maxVariantPrice {
|
||||||
featuredImage {
|
amount
|
||||||
...image
|
currencyCode
|
||||||
}
|
}
|
||||||
images(first: 20) {
|
minVariantPrice {
|
||||||
edges {
|
amount
|
||||||
node {
|
currencyCode
|
||||||
...image
|
}
|
||||||
|
}
|
||||||
|
variants(first: 250) {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
id
|
||||||
|
title
|
||||||
|
availableForSale
|
||||||
|
selectedOptions {
|
||||||
|
name
|
||||||
|
value
|
||||||
|
}
|
||||||
|
price {
|
||||||
|
amount
|
||||||
|
currencyCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
featuredImage {
|
||||||
|
...image
|
||||||
|
}
|
||||||
|
images(first: 99) {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
...image
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
seo {
|
||||||
|
...seo
|
||||||
|
}
|
||||||
|
tags
|
||||||
|
updatedAt
|
||||||
|
collections(first: 99) {
|
||||||
|
nodes {
|
||||||
|
handle
|
||||||
|
title
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
seo {
|
${imageFragment}
|
||||||
...seo
|
${seoFragment}
|
||||||
}
|
|
||||||
tags
|
|
||||||
updatedAt
|
|
||||||
}
|
|
||||||
${imageFragment}
|
|
||||||
${seoFragment}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export default productFragment;
|
export default productFragment;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user