server icon indicating copy to clipboard operation
server copied to clipboard

BUG: Incorrect hasPreviousFlag of the pageInfo object

Open hero101 opened this issue 1 year ago • 0 comments

Describe the bug The hasPreviousPage flag of the pageInfo object is returning mostly always false, where it must say if there is a data prior to the cursor used.

To Reproduce Steps to reproduce the behavior:

  1. Execute the following request and get the value of endCursor
{
  activityFeed(first:1) {
    pageInfo {
      hasNextPage
      hasPreviousPage
      endCursor
    }
    activityFeed {
      id
    }
  }
}
  1. Execute the following request and use the value of endCursor in the after argument.
{
  activityFeed(first:1, after:"END_CURSOR_VALUE_HERE") {
    pageInfo {
      hasNextPage
      hasPreviousPage
      endCursor
    }
    activityFeed {
      id
    }
  }
}
  1. hasPreviousPage must be true but is false.

Expected behavior The value of hasPreviousPage must be true for results where you are requesting a page of the list of results. This is valid in the cases where in a list out of 4 items, you are requesting any number of items after the first.

hero101 avatar Feb 01 '24 10:02 hero101