graphql search last fails

Hi, I’m having an issue when searching for Users. 
Getting first results, and pagination with cursor workas as expected, but when querying the las page search with last param only, it returns the first results anyway. page info hasNextPage is also true

The query:

query ($query: String!) {
  search(query: $query, last: 10, type: USER) {
    userCount
    pageInfo {
      hasNextPage
    }
    edges {
      node {
        ... on User {
          name
        }
      }
    }
  }
}

Am I missing something? It works with every other search pagination option:
go to firstpage, go to previous page, got to next page

Thanks!

Hi @flakolefluk,

Thanks for being here! I think the issue here is with the differences between offset vs cursor based pagination, the REST API allows to fetch multiple pages of results in parallel thanks to offset. That is not possible with GraphQL. 

Here is a really great external blog detailing: “Offset pagination contains page numbers in addition to next and previous links. But due to the highly dynamic nature of the data, we can’t provide page numbers for cursor based pagination”.

I’d love for someone else to chime in here as they might have more experience here.

Thanks for the reply. Perhaps i shouldn’t have used the ‘page’ word. So if understand correctly there’s no way to get the latest 10 items of a Query using the GraphQL api.