Add user setting to provide location and show events near location on

homepage

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-02-12 18:19:49 +01:00
parent 7d8399f4c8
commit b1cc3868a6
27 changed files with 538 additions and 112 deletions

View File

@@ -56,6 +56,15 @@ defmodule Mobilizon.GraphQL.Schema.AddressType do
field(:origin_id, :string, description: "The address's original ID from the provider")
end
@desc """
A list of possible values for the type option to search an address.
Results may vary depending on the geocoding provider.
"""
enum :address_search_type do
value(:administrative, description: "Administrative results (cities, regions,...)")
end
object :address_queries do
@desc "Search for an address"
field :search_address, type: list_of(:address) do
@@ -73,6 +82,8 @@ defmodule Mobilizon.GraphQL.Schema.AddressType do
arg(:limit, :integer, default_value: 10, description: "The limit of search results per page")
arg(:type, :address_search_type, description: "Filter by type of results")
resolve(&Address.search/3)
end