Allow to search events by online status

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-11-06 14:37:45 +01:00
parent 9ac3da618d
commit 69e91e89f5
8 changed files with 232 additions and 75 deletions

View File

@@ -44,6 +44,15 @@ defmodule Mobilizon.GraphQL.Schema.SearchType do
end)
end
enum :event_type do
value(:in_person,
description:
"The event will happen in person. It can also be livestreamed, but has a physical address"
)
value(:online, description: "The event will only happen online. It has no physical address")
end
object :search_queries do
@desc "Search persons"
field :search_persons, :persons do
@@ -83,6 +92,7 @@ defmodule Mobilizon.GraphQL.Schema.SearchType do
arg(:term, :string, default_value: "")
arg(:tags, :string, description: "A comma-separated string listing the tags")
arg(:location, :string, description: "A geohash for coordinates")
arg(:type, :event_type, description: "Whether the event is online or in person")
arg(:radius, :float,
default_value: 50,