Make Categories a predefined list

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Allow null values for categories for now

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-02-22 16:54:01 +01:00
parent 75554cd3f5
commit 7086fe8389
27 changed files with 89 additions and 655 deletions

View File

@@ -7,7 +7,6 @@ defmodule MobilizonWeb.Schema.EventType do
import Absinthe.Resolution.Helpers, only: [dataloader: 1]
import_types(MobilizonWeb.Schema.AddressType)
import_types(MobilizonWeb.Schema.Events.ParticipantType)
import_types(MobilizonWeb.Schema.Events.CategoryType)
import_types(MobilizonWeb.Schema.TagType)
alias MobilizonWeb.Resolvers
@@ -44,7 +43,7 @@ defmodule MobilizonWeb.Schema.EventType do
description: "The event's tags"
)
field(:category, :category, description: "The event's category")
field(:category, :string, description: "The event's category")
field(:participants, list_of(:participant),
resolve: &MobilizonWeb.Resolvers.Event.list_participants_for_event/3,