Add local groups as statistics

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-09-30 10:42:19 +02:00
parent 2dccd5eccd
commit a600720062
9 changed files with 79 additions and 5 deletions

View File

@@ -13,7 +13,8 @@ defmodule Mobilizon.GraphQL.Resolvers.Statistics do
%{
number_of_users: StatisticsModule.get_cached_value(:local_users),
number_of_events: StatisticsModule.get_cached_value(:local_events),
number_of_comments: StatisticsModule.get_cached_value(:local_comments)
number_of_comments: StatisticsModule.get_cached_value(:local_comments),
number_of_groups: StatisticsModule.get_cached_value(:local_groups)
}}
end
end

View File

@@ -12,6 +12,7 @@ defmodule Mobilizon.GraphQL.Schema.StatisticsType do
field(:number_of_users, :integer, description: "The number of local users")
field(:number_of_events, :integer, description: "The number of local events")
field(:number_of_comments, :integer, description: "The number of local comments")
field(:number_of_groups, :integer, description: "The number of local groups")
end
object :statistics_queries do