Show number of participants

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-09-11 16:37:30 +02:00
parent 7bbed59f77
commit c3b03a2e6b
8 changed files with 146 additions and 3 deletions

View File

@@ -54,6 +54,8 @@ defmodule MobilizonWeb.Schema.EventType do
field(:category, :string, description: "The event's category")
field(:participant_stats, :participant_stats, resolve: &Event.stats_participants_for_event/3)
field(:participants, list_of(:participant),
resolve: &Event.list_participants_for_event/3,
description: "The event's participants"
@@ -92,6 +94,11 @@ defmodule MobilizonWeb.Schema.EventType do
value(:cancelled, description: "The event is cancelled")
end
object :participant_stats do
field(:approved, :integer, description: "The number of approved participants")
field(:unapproved, :integer, description: "The number of unapproved participants")
end
object :event_offer do
field(:price, :float, description: "The price amount for this offer")
field(:price_currency, :string, description: "The currency for this price offer")