Hello @Shopify_77
I’m having a bit of an issue with the customers root query returning a different result than the filter in the admin.
This query should return customers without any orders.
query getCustomers($limit:Int!,$after:String){
customers(first:$limit after:$after query:"orders_count:0"){
pageInfo{
hasNextPage
endCursor
}
nodes{
id
defaultAddress{
address1
zip
}
}
}
}
However I get zero results returned:
{
"data": {
"customers": {
"pageInfo": {
"hasNextPage": true,
"endCursor": null
},
"nodes": []
}
},
"extensions": {
"cost": {
"requestedQueryCost": 42,
"actualQueryCost": 3,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 997,
"restoreRate": 50
}
}
}
}
The “Same” query run in the admin however, returns.
This query which I pulled out of the admin:
{
customerSegmentMembers(
first:20 query:"number_of_orders=0"
) {
pageInfo {
hasNextPage
hasPreviousPage
}
edges {
node{
id
defaultAddress {
id
}
}
}
}
}
Returns the expected results, however has a much more limited number of fields that can be returned.
Can you please have a look at this?
Tested with versions 2022-07 & 10 and 2023-01
