lib/graphql/kaminari_connection.rb in graphql-kaminari_connection-0.1.0 vs lib/graphql/kaminari_connection.rb in graphql-kaminari_connection-1.0.0

- old
+ new

@@ -52,10 +52,11 @@ field :is_out_of_range, 'Boolean', null: false, method: :out_of_range? field :limit_value, 'Int', null: false field :next_page, 'Int', null: true field :prev_page, 'Int', null: true field :total_pages, 'Int', null: false unless without_count + field :total_count, 'Int', null: false unless without_count end end end module ClassMethods @@ -84,12 +85,12 @@ @page_type ||= define_page_type(without_count: false) end def page_arguments [ - [:page, type: 'Int', required: false], - [:per, type: 'Int', required: false] + [:page, { type: 'Int', required: false }], + [:per, { type: 'Int', required: false }] ] end # @param without_count [Boolean] # @return [Class] @@ -101,11 +102,11 @@ Class.new(base_page_class) do graphql_name type_name description "Autogenerated page type for #{type_name}" - field :page_data, page_data_type_class, null: false, method: :object - field :items, [type_class], 'A list of items', null: false, method: :object + field :page_data, page_data_type_class, null: false, method: :itself + field :items, [type_class], 'A list of items', null: false, method: :itself end end end end end