Expose participants number through API
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
bf25d22786
commit
98472e7222
|
@ -101,7 +101,8 @@ defmodule MobilizonWeb.Resolvers.Event do
|
||||||
%{
|
%{
|
||||||
approved: Mobilizon.Events.count_approved_participants(id),
|
approved: Mobilizon.Events.count_approved_participants(id),
|
||||||
unapproved: Mobilizon.Events.count_unapproved_participants(id),
|
unapproved: Mobilizon.Events.count_unapproved_participants(id),
|
||||||
rejected: Mobilizon.Events.count_rejected_participants(id)
|
rejected: Mobilizon.Events.count_rejected_participants(id),
|
||||||
|
participants: Mobilizon.Events.count_participant_participants(id),
|
||||||
}}
|
}}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -115,6 +115,7 @@ defmodule MobilizonWeb.Schema.EventType do
|
||||||
field(:approved, :integer, description: "The number of approved participants")
|
field(:approved, :integer, description: "The number of approved participants")
|
||||||
field(:unapproved, :integer, description: "The number of unapproved participants")
|
field(:unapproved, :integer, description: "The number of unapproved participants")
|
||||||
field(:rejected, :integer, description: "The number of rejected participants")
|
field(:rejected, :integer, description: "The number of rejected participants")
|
||||||
|
field(:participants, :integer, description: "The number of simple participants (excluding creators)")
|
||||||
end
|
end
|
||||||
|
|
||||||
object :event_offer do
|
object :event_offer do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# source: http://localhost:4000/api
|
# source: http://localhost:4000/api
|
||||||
# timestamp: Fri Oct 04 2019 15:04:46 GMT+0200 (GMT+02:00)
|
# timestamp: Fri Oct 11 2019 11:53:52 GMT+0200 (Central European Summer Time)
|
||||||
|
|
||||||
schema {
|
schema {
|
||||||
query: RootQueryType
|
query: RootQueryType
|
||||||
|
@ -681,6 +681,9 @@ type ParticipantStats {
|
||||||
"""The number of approved participants"""
|
"""The number of approved participants"""
|
||||||
approved: Int
|
approved: Int
|
||||||
|
|
||||||
|
"""The number of simple participants (excluding creators)"""
|
||||||
|
participants: Int
|
||||||
|
|
||||||
"""The number of rejected participants"""
|
"""The number of rejected participants"""
|
||||||
rejected: Int
|
rejected: Int
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue