Class: GraphQL::Groups::Schema::AggregateField
- Inherits:
-
Schema::Field
- Object
- Schema::Field
- GraphQL::Groups::Schema::AggregateField
- Defined in:
- lib/graphql/groups/schema/aggregate_field.rb
Instance Attribute Summary collapse
-
#own_attributes ⇒ Object
readonly
Returns the value of attribute own_attributes.
-
#query_method ⇒ Object
readonly
Returns the value of attribute query_method.
Instance Method Summary collapse
- #attribute(attribute) ⇒ Object
-
#initialize(query_method:, **kwargs, &definition_block) ⇒ AggregateField
constructor
A new instance of AggregateField.
Constructor Details
#initialize(query_method:, **kwargs, &definition_block) ⇒ AggregateField
Returns a new instance of AggregateField.
9 10 11 12 |
# File 'lib/graphql/groups/schema/aggregate_field.rb', line 9 def initialize(query_method:, **kwargs, &definition_block) @query_method = query_method super(**kwargs, &definition_block) end |
Instance Attribute Details
#own_attributes ⇒ Object (readonly)
Returns the value of attribute own_attributes.
7 8 9 |
# File 'lib/graphql/groups/schema/aggregate_field.rb', line 7 def own_attributes @own_attributes end |
#query_method ⇒ Object (readonly)
Returns the value of attribute query_method.
7 8 9 |
# File 'lib/graphql/groups/schema/aggregate_field.rb', line 7 def query_method @query_method end |
Instance Method Details
#attribute(attribute) ⇒ Object
14 15 16 17 |
# File 'lib/graphql/groups/schema/aggregate_field.rb', line 14 def attribute(attribute) @own_attributes ||= [] @own_attributes += Array.wrap(attribute) end |