feat: implement products infinite loading

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
Chloe
2024-05-08 16:10:44 +07:00
parent 78a79a44b7
commit b4113ac4c8
11 changed files with 263 additions and 127 deletions

View File

@@ -42,14 +42,14 @@ export const getCollectionProductsQuery = /* GraphQL */ `
$sortKey: ProductCollectionSortKeys
$reverse: Boolean
$filters: [ProductFilter!]
$after: String
) {
collection(handle: $handle) {
products(sortKey: $sortKey, filters: $filters, reverse: $reverse, first: 100) {
products(sortKey: $sortKey, filters: $filters, reverse: $reverse, first: 50, after: $after) {
edges {
node {
...product
}
cursor
}
filters {
id