Class: Types::NotificationsWithCountsConnection
- Inherits:
-
GraphQL::Types::Relay::BaseConnection
- Object
- GraphQL::Types::Relay::BaseConnection
- Types::NotificationsWithCountsConnection
- Defined in:
- app/graphql/types/notifications_with_counts_connection.rb
Instance Method Summary collapse
Instance Method Details
#total_count ⇒ Object
7 8 9 10 11 |
# File 'app/graphql/types/notifications_with_counts_connection.rb', line 7 def total_count # - `object` is the Connection # - `object.items` is the original collection of Notifications object.items.size end |
#unread_count ⇒ Object
14 15 16 |
# File 'app/graphql/types/notifications_with_counts_connection.rb', line 14 def unread_count object.items.unread.size end |