Sha256: e7256d3c2323dccd55bc5d98093bdb4e1b055d72e4dccc85033be51545a96473

Contents?: true

Size: 450 Bytes

Versions: 26

Compression:

Stored size: 450 Bytes

Contents

# frozen_string_literal: true

module Ibrain
  module Types
    class BaseConnection < Types::BaseObject
      # add `nodes` and `pageInfo` fields, as well as `edge_type(...)` and `node_nullable(...)` overrides
      include GraphQL::Types::Relay::ConnectionBehaviors

      field :aggregate, Ibrain::Types::AggregateType, null: false, camelize: false

      def aggregate
        Ibrain::Aggregate.new(object.items.size)
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
ibrain-core-0.5.13 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.5.12 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.5.10 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.5.9 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.5.8 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.5.7 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.5.6 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.5.5 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.5.4 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.5.3 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.5.2 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.5.1 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.5.0 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.4.9 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.4.8 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.4.7 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.4.5 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.4.4 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.4.3 app/graphql/ibrain/types/base_connection.rb
ibrain-core-0.4.2 app/graphql/ibrain/types/base_connection.rb