insights: insightViews query pagination doesn't return the correct number of results
Created by: coury-clark
When providing a first:
argument into the insightViews
query, seemingly incorrect results return:
query insightviews {
insightViews (first:1) {
nodes {
id
}
pageInfo {
hasNextPage
endCursor
}
}
}
{
"data": {
"insightViews": {
"nodes": [],
"pageInfo": {
"hasNextPage": false,
"endCursor": null
}
}
}
}
This doesn't work for both first:1
and first:2
, but starts working after frist:3
, but returns the wrong count:
query insightviews {
insightViews (first:3) {
nodes {
id
}
pageInfo {
hasNextPage
endCursor
}
}
}
{
"data": {
"insightViews": {
"nodes": [
{
"id": "aW5zaWdodF92aWV3OiIyMkVIR2pXOTFkSzNOanpmM2hyWnU3WDJwMlgi"
}
],
"pageInfo": {
"hasNextPage": true,
"endCursor": "aW5zaWdodF92aWV3OiIyMkVIR2pXOTFkSzNOanpmM2hyWnU3WDJwMlgi"
}
}
}
}