I'm trying to develop filters by passing a query string in the below productFetch() function and want to show only 28 products on the screen returned from the query below. How to make graphql query return random 28 products instead of the first 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
}
}
}