mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-23 16:33:28 +00:00
f5241954bd
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
19 lines
530 B
Elixir
19 lines
530 B
Elixir
defmodule Mobilizon.GraphQL.Resolvers.Statistics do
|
|
@moduledoc """
|
|
Handles the statistics-related GraphQL calls.
|
|
"""
|
|
|
|
alias Mobilizon.Service.Statistics, as: StatisticsModule
|
|
|
|
@doc """
|
|
Gets config.
|
|
"""
|
|
def get_statistics(_parent, _params, _context) do
|
|
{:ok,
|
|
%{
|
|
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)
|
|
}}
|
|
end
|
|
end
|