Allow to register custom categories
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -16,6 +16,13 @@ defmodule Mobilizon.GraphQL.Schema.ConfigType do
|
||||
field(:contact, :string, description: "The instance's contact details")
|
||||
|
||||
field(:languages, list_of(:string), description: "The instance's admins languages")
|
||||
|
||||
field(:event_categories, list_of(:event_category_option),
|
||||
description: "The instance list of event categories possibilities"
|
||||
) do
|
||||
resolve(&Config.event_categories/3)
|
||||
end
|
||||
|
||||
field(:registrations_open, :boolean, description: "Whether the registrations are opened")
|
||||
|
||||
field(:registrations_allowlist, :boolean,
|
||||
@@ -332,6 +339,14 @@ defmodule Mobilizon.GraphQL.Schema.ConfigType do
|
||||
)
|
||||
end
|
||||
|
||||
@desc """
|
||||
Event categories list configuration
|
||||
"""
|
||||
object :event_category_option do
|
||||
field(:id, :string, description: "The ID of the event category")
|
||||
field(:label, :string, description: "The translated name of the event category")
|
||||
end
|
||||
|
||||
object :config_queries do
|
||||
@desc "Get the instance config"
|
||||
field :config, :config do
|
||||
|
||||
Reference in New Issue
Block a user