Sha256: c66db4fbd411da9f87edbc1e378ae441cefbbea15264fd55968b451333207616

Contents?: true

Size: 505 Bytes

Versions: 8

Compression:

Stored size: 505 Bytes

Contents

# frozen_string_literal: true

module GraphQL
  module Groups
    module Schema
      class AggregateField < GraphQL::Schema::Field
        attr_reader :own_attributes, :query_method

        def initialize(query_method:, **kwargs, &definition_block)
          @query_method = query_method
          super(**kwargs, &definition_block)
        end

        def attribute(attribute)
          @own_attributes ||= []
          @own_attributes += Array.wrap(attribute)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
graphql-groups-0.2.3 lib/graphql/groups/schema/aggregate_field.rb
graphql-groups-0.2.2 lib/graphql/groups/schema/aggregate_field.rb
graphql-groups-0.2.1 lib/graphql/groups/schema/aggregate_field.rb
graphql-groups-0.2.0 lib/graphql/groups/schema/aggregate_field.rb
graphql-groups-0.1.4 lib/graphql/groups/schema/aggregate_field.rb
graphql-groups-0.1.3 lib/graphql/groups/schema/aggregate_field.rb
graphql-groups-0.1.2 lib/graphql/groups/schema/aggregate_field.rb
graphql-groups-0.1.1 lib/graphql/groups/schema/aggregate_field.rb