This was an idea @yuki24 mentioned in our graphql lunch & learn.
Right now we ask for total counts for pagination so that we can know about before or afters:
here
export const parseRelayOptions = options => {
const { limit: size, offset } = getPagingParameters(options)
const page = (size + offset) / size
const gravityArgs = omit(options, ["first", "after", "last", "before"])
return Object.assign({}, { page, size, offset }, gravityArgs)
}
Perhaps we can move this to instead get x + 1 ( or x -1 ) to handle knowing if there's another page?