Sha256: 41c10d75febbd4c7004bb5ee9528ccd2582267661295fad8e8574acea0344f92
Contents?: true
Size: 412 Bytes
Versions: 50
Compression:
Stored size: 412 Bytes
Contents
module Souls class SoulsConnection < GraphQL::Types::Relay::BaseConnection field :total_count, Integer, null: false do description "Total number of items" end field :total_pages, Integer, null: false do description "Total number of pages" end def total_count object.items.size end def total_pages (total_count / object.max_page_size) + 1 end end end
Version data entries
50 entries across 50 versions & 1 rubygems