Class: GraphQL::Groups::Schema::GroupResultType

Inherits:
Schema::Object
  • Object
show all
Includes:
HasAggregates
Defined in:
lib/graphql/groups/schema/group_result_type.rb

Instance Method Summary collapse

Methods included from HasAggregates

included

Instance Method Details

#count(scope:) ⇒ Object



22
23
24
# File 'lib/graphql/groups/schema/group_result_type.rb', line 22

def count(scope:, **)
  scope.size
end

#keyObject



18
19
20
# File 'lib/graphql/groups/schema/group_result_type.rb', line 18

def key
  group_result[0]
end

#resolve_countObject



26
27
28
# File 'lib/graphql/groups/schema/group_result_type.rb', line 26

def resolve_count
  group_result[1][:count]
end