2019-03-22 10:53:38 +01:00
|
|
|
defmodule MobilizonWeb.Schema.ConfigType do
|
|
|
|
@moduledoc """
|
|
|
|
Schema representation for User
|
|
|
|
"""
|
|
|
|
use Absinthe.Schema.Notation
|
|
|
|
|
|
|
|
alias MobilizonWeb.Resolvers.Config
|
|
|
|
|
|
|
|
@desc "A config object"
|
|
|
|
object :config do
|
|
|
|
# Instance name
|
|
|
|
field(:name, :string)
|
2019-04-03 17:29:03 +02:00
|
|
|
field(:description, :string)
|
2019-03-22 10:53:38 +01:00
|
|
|
|
|
|
|
field(:registrations_open, :boolean)
|
|
|
|
end
|
|
|
|
|
|
|
|
object :config_queries do
|
|
|
|
@desc "Get the instance config"
|
|
|
|
field :config, :config do
|
|
|
|
resolve(&Config.get_config/3)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|