2019-03-22 09:53:38 +00:00
|
|
|
defmodule MobilizonWeb.Resolvers.Config do
|
|
|
|
@moduledoc """
|
|
|
|
Handles the config-related GraphQL calls
|
|
|
|
"""
|
2019-03-22 12:58:19 +00:00
|
|
|
|
2019-03-22 09:53:38 +00:00
|
|
|
import Mobilizon.CommonConfig
|
|
|
|
|
|
|
|
@doc """
|
|
|
|
Get config
|
|
|
|
"""
|
|
|
|
def get_config(_parent, _params, _context) do
|
2019-04-03 15:29:03 +00:00
|
|
|
{:ok,
|
|
|
|
%{
|
|
|
|
name: instance_name(),
|
|
|
|
registrations_open: registrations_open?(),
|
|
|
|
description: instance_description()
|
|
|
|
}}
|
2019-03-22 09:53:38 +00:00
|
|
|
end
|
|
|
|
end
|