I am using GraphQL to get ‘pages’ of customers, using first:50 records, where the totalCount is clearly 216 records for this segment:
{
"data": {
"customerSegmentMembers": {
"statistics": {
"totalCount": 216
},
"edges": [
{
"node": {
"id": "gid://shopify/CustomerSegmentMember/4334292296",
"defaultEmailAddress": {
"emailAddress": "xxxxx@gmail.com"
}
}
},
{
"node": {
"id": "gid://shopify/CustomerSegmentMember/5188404177",
"defaultEmailAddress": {
"emailAddress": "xxxxx@ymail.com"
}
}
}, ....
and then trying to use ‘after:’ with the hardcoded endcursor value to get the next 50 records:
{
customerSegmentMembers(first: 50, segmentId: "gid://shopify/Segment/361633153183", after: "AAAAAUkZuZEAABA0ZTU3NzZjNzBlOTI2M2Q2") {
statistics {
totalCount
}
edges {
node {
id
defaultEmailAddress {
emailAddress
}
}
}
pageInfo {
hasNextPage
hasPreviousPage
endCursor
}
}
}
This returns this non-helpful message:
{
"data": null,
"errors": [
{
"message": "an error has occurred. trace_id=4e9a72794cb12c9e2386184077902766 in segmentMembers",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"customerSegmentMembers"
]
}
],
"extensions": {
"cost": {
"requestedQueryCost": 202,
"actualQueryCost": 2,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 998,
"restoreRate": 50
}
}
}
}
Any ideas as to why the addition of the after: argument is causing an error. The internets were no help, as apparently this is too new. Thank you for any help!