Hello everyone,
I am trying to migrate a products query that I run for stores from REST to graphQL the code seems to be working - however for one particular client I am 705 items missing
I think it is to do with archived products, which I am querying so I cannot see why when I do this as REST it works correctly and graphql as not, for reference on the REST i use a status=any [which is not acceptable on grapql]. The problem I also have with this client is they are using the taxonomy for product descriptions and this value doesn’t seem to exist in the REST version.
{
"query": "query { products( first: 250 sortKey: CREATED_AT query: \"created_at:>=2000-01-01 AND created_at:<=2026-01-01 AND status:'active' OR status:'archived' OR status:'draft'\")
{ edges
{
cursor
node
{ id
legacyResourceId
title
productType
status
category { id }
createdAt
updatedAt
variants(first: 250) {
edges
{ node
{ id
displayName
legacyResourceId
createdAt
updatedAt
sku
title
price
compareAtPrice
inventoryItem
{ id
legacyResourceId
unitCost {
amount
currencyCode }
}
}
}
}
}
}
pageInfo
{ hasNextPage endCursor }
}
}"
}
This is my current query, that works apart from missing 700+ products.
I have tried various things but it makes no difference.
When I requery it i change it to [where the zzzzzz is replaced with the next cursor]
"query": "query { products( first: 250 sortKey: CREATED_AT after: \"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ\" query: \"created_at:>=2000-01-01 AND created_at:<=2026-01-01 AND status:'active' OR status:'archived' OR status:'draft'\")
{ edges
{
cursor
node
{ id
legacyResourceId
title
productType
status
category { id }
createdAt
updatedAt
variants(first: 250) {
edges
{ node
{ id
displayName
legacyResourceId
createdAt
updatedAt
sku
title
price
compareAtPrice
inventoryItem
{ id
legacyResourceId
unitCost {
amount
currencyCode }
}
}
}
}
}
}
pageInfo
{ hasNextPage endCursor }
}
}"
}
Can anyone point me in the right direction please?
Thanks
Lucy
