【发布时间】:2021-09-12 10:17:44
【问题描述】:
我正在尝试通过在下面的 productFetch() 函数中传递一个查询字符串来开发过滤器,并希望在从下面的查询返回的屏幕上只显示 28 个产品。 如何使graphql查询返回随机的28个产品而不是前28个?
query productFetch($first: Int, $after: String, $query: String) {
products(first: $first, after: $after, query: $query) {
edges {
node {
priceRange {
minVariantPrice {
amount
currencyCode
}
}
title
images(first: 1) {
edges {
node {
transformedSrc(maxWidth: 300)
}
}
}
}
cursor
}
pageInfo {
hasNextPage
}
}
}
【问题讨论】:
标签: reactjs graphql shopify apollo-client gqlquery