Class: Types::CountableConnectionType
- Inherits:
-
GraphQL::Types::Relay::BaseConnection
- Object
- GraphQL::Types::Relay::BaseConnection
- Types::CountableConnectionType
- Defined in:
- app/graphql/types/countable_connection_type.rb
Overview
rubocop: disable Graphql/AuthorizeTypes
Direct Known Subclasses
Types::Ci::RunnerCountableConnectionType, IssueConnectionType, MergeRequestConnectionType, TimeTracking::TimelogConnectionType
Instance Method Summary collapse
Instance Method Details
#count ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/graphql/types/countable_connection_type.rb', line 9 def count relation = object.items # sometimes relation is an Array relation = relation.without_order if relation.respond_to?(:reorder) if relation.try(:group_values).present? relation.size.keys.size else relation.size end end |