Skip to content

RFC: Update metaphysics to not grab total counts but to grab x + 1 items #866

@orta

Description

@orta

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?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions