Here is my first query:
query MyQuery {
collection(handle: "women") {
products(
first: 250
sortKey: ID
) {
edges {
node {
id
handle
variants(first: 20) {
edges {
node {
id
title
}
}
}
id
handle
}
cursor
}
pageInfo {
endCursor
hasNextPage
}
}
}
}
I get 250 products and an end cursor. My next query is:
query MyQuery {
collection(handle: "women") {
products(
first: 250
after: "eyJsYXN0X2lkIjo3ODUyMzU0OTk0NDE0LCJsYXN0X3ZhbHVlIjoiNzg1MjM1NDk5NDQxNCJ9"
sortKey: ID
) {
edges {
node {
id
handle
variants(first: 20) {
edges {
node {
id
title
}
}
}
id
handle
}
cursor
}
pageInfo {
endCursor
hasNextPage
}
}
}
}
and I end up getting a cursor which I use in the next query:
query MyQuery {
collection(handle: "women") {
products(
first: 250
after: "eyJsYXN0X2lkIjo3ODUyNDQzMDA5MjYyLCJsYXN0X3ZhbHVlIjoiNzg1MjQ0MzAwOTI2MiJ9"
sortKey: ID
) {
edges {
node {
id
handle
variants(first: 20) {
edges {
node {
id
title
}
}
}
id
handle
}
cursor
}
pageInfo {
endCursor
hasNextPage
}
}
}
}
This query tell me there is not a next page and when I use its cursor, there is indeed nothing after it.
Why can’t I get all 1100 products in my collection?