Sha256: c6df90658a5be3e621150167512ad65a6296694a4472b98045b3d0a627a758ae
Contents?: true
Size: 635 Bytes
Versions: 170
Compression:
Stored size: 635 Bytes
Contents
# frozen_string_literal: true require "graphql/pagination/relation_connection" module GraphQL module Pagination # Customizes `RelationConnection` to work with `Sequel::Dataset`s. class SequelDatasetConnection < Pagination::RelationConnection private def relation_offset(relation) relation.opts[:offset] end def relation_limit(relation) relation.opts[:limit] end def relation_count(relation) # Remove order to make it faster relation.order(nil).count end def null_relation(relation) relation.where(false) end end end end
Version data entries
170 entries across 170 versions & 2 rubygems