Focusing on managing products, variants, and collections through the API.
Hello,
Running across a weird issue that is only occurring whenever a collection with a large number of product exists.
Here is the GraphQL query being used:
{
collections(query: "collection_type:custom") {
edges {
node {
id
title
productsCount
products {
edges {
node {
id
}
}
}
metafields {
edges {
node {
id
type
value
key
namespace
}
}
}
}
}
}
productVariants {
edges {
node {
id
sku
product {
id
}
}
}
}
}
Note that it is running as a bulkOperationRunQuery.
The expectation is that it returns all custom collections (including respective id, title, number of products, and ID of all products in this collection) and all product variants (including id, SKU, and respective product's id).
When a collection with a large number of products does not exist, it returns the expected values:
However, when a collection with a large number of products (600+ in this case), the returned JSONL is broken and does not match the requested GraphQL parameters:
As you can see, it no longer returns any collection data (id, title, products count) but instead just returns the information of the products included in the collections.
This seems like a bug in Shopify.
Open to suggestions on what we might be doing wrong or how would we go about getting this bug corrected.
Hey @igor_luxcom
Can you please DM me store details so I can attempt to replicate?
Scott | Developer Advocate @ Shopify
DM'd!
Thanks.