Improve search

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-08-22 12:12:09 +02:00
parent 444e0d6a0c
commit baac00f678
36 changed files with 1343 additions and 1013 deletions

View File

@@ -12,7 +12,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Config do
"""
@spec get_config(any(), map(), Absinthe.Resolution.t()) :: {:ok, map()}
def get_config(_parent, _params, %{context: %{ip: ip}}) do
# ip = "2a01:e0a:184:2000:1112:e19d:9779:88c8"
ip = "2a01:e0a:184:2000:1112:e19d:9779:88c8"
geolix = Geolix.lookup(ip)
country_code =

View File

@@ -95,6 +95,14 @@ defmodule Mobilizon.GraphQL.Schema.SearchType do
arg(:type, :event_type, description: "Whether the event is online or in person")
arg(:category, :string, description: "The category for the event")
arg(:category_one_of, list_of(:string),
description: "The list of categories the event can be in"
)
arg(:status_one_of, list_of(:event_status),
description: "The list of statuses this event can have"
)
arg(:radius, :float,
default_value: 50,
description: "Radius around the location to search in"