我正在使用shopify-buy SDK 和 fetchQuery 函数发出以下有效负载:
first: 50
query: "tags:[new] AND priceRange:{minVariantPrice:0 AND maxVariantPrice:40}"
reverse: false
sortKey: "PRICE"
这将返回所有产品,据我所知,标签过滤器也不起作用。我在哪里错了?这是发出的命令:
fragment ProductFragment on Product {
id
availableForSale
createdAt
updatedAt
descriptionHtml
description
handle
productType
title
vendor
publishedAt
onlineStoreUrl
options {
id
name
values
}
images(first: 250) {
pageInfo {
hasNextPage
hasPreviousPage
}
edges {
cursor
node {
id
src
altText
}
}
}
variants(first: 250) {
pageInfo {
hasNextPage
hasPreviousPage
}
edges {
cursor
node {
...VariantFragment
}
}
}
}
fragment VariantFragment on ProductVariant {
id
title
price
priceV2 {
amount
currencyCode
}
presentmentPrices(first: 20) {
pageInfo {
hasNextPage
hasPreviousPage
}
edges {
node {
price {
amount
currencyCode
}
compareAtPrice {
amount
currencyCode
}
}
}
}
weight
available: availableForSale
sku
compareAtPrice
compareAtPriceV2 {
amount
currencyCode
}
image {
id
src: originalSrc
altText
}
selectedOptions {
name
value
}
unitPrice {
amount
currencyCode
}
unitPriceMeasurement {
measuredType
quantityUnit
quantityValue
referenceUnit
referenceValue
}
}
query ($first: Int!, $query: String, $sortKey: ProductSortKeys, $reverse: Boolean) {
products(first: $first, query: $query, sortKey: $sortKey, reverse: $reverse, after: "eyJsYXN0X2lkIjoxNTQzODk0MjM3MjM5LCJsYXN0X3ZhbHVlIjoiMTU0Mzg5NDIzNzIzOSJ9") {
pageInfo {
hasNextPage
hasPreviousPage
}
edges {
cursor
node {
...ProductFragment
}
}
}
}