class GraphQL::Pagination::MongoidRelationConnection

def null_relation(relation)

def null_relation(relation)
  relation.without_options.none
end

def relation_count(relation)

def relation_count(relation)
  # Mongo's `.count` doesn't apply limit or skip, which we need. So we have to load _everything_!
  relation.to_a.count
end

def relation_limit(relation)

def relation_limit(relation)
  relation.options.limit
end

def relation_offset(relation)

def relation_offset(relation)
  relation.options.skip
end