Allow to search groups by location

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-08-05 16:44:08 +02:00
parent 3bae65374f
commit 3c077c59ad
18 changed files with 408 additions and 149 deletions

View File

@@ -27,7 +27,7 @@ defmodule Mobilizon.GraphQL.Schema.SearchType do
object :search_queries do
@desc "Search persons"
field :search_persons, :persons do
arg(:search, non_null(:string))
arg(:term, :string, default_value: "")
arg(:page, :integer, default_value: 1)
arg(:limit, :integer, default_value: 10)
@@ -36,7 +36,9 @@ defmodule Mobilizon.GraphQL.Schema.SearchType do
@desc "Search groups"
field :search_groups, :groups do
arg(:search, non_null(:string))
arg(:term, :string, default_value: "")
arg(:location, :string, description: "A geohash for coordinates")
arg(:radius, :float, default_value: 50)
arg(:page, :integer, default_value: 1)
arg(:limit, :integer, default_value: 10)