forked from potsda.mn/mobilizon
7c11807c14
Also: * Refactor interacting with a remote event so that you can interact with a remote group as well * Add a setting for group admins to pick between an open and invite-only group * Fix new groups without posts/todos/resources/events/conversations URL set * Repair local groups that haven't got their posts/todos/resources/events/conversations URL set * Add a scheduled job to refresh remote groups every hour * Add a user setting to pick when to receive notifications when there's new members to approve (will be used when this feature is available) * Fix pagination for members Signed-off-by: Thomas Citharel <tcit@tcit.fr>
33 lines
754 B
Elixir
33 lines
754 B
Elixir
defmodule Mobilizon.GraphQL.Resolvers.Search do
|
|
@moduledoc """
|
|
Handles the event-related GraphQL calls
|
|
"""
|
|
|
|
alias Mobilizon.GraphQL.API.Search
|
|
|
|
@doc """
|
|
Search persons
|
|
"""
|
|
def search_persons(_parent, %{page: page, limit: limit} = args, _resolution) do
|
|
Search.search_actors(args, page, limit, :Person)
|
|
end
|
|
|
|
@doc """
|
|
Search groups
|
|
"""
|
|
def search_groups(_parent, %{page: page, limit: limit} = args, _resolution) do
|
|
Search.search_actors(args, page, limit, :Group)
|
|
end
|
|
|
|
@doc """
|
|
Search events
|
|
"""
|
|
def search_events(_parent, %{page: page, limit: limit} = args, _resolution) do
|
|
Search.search_events(args, page, limit)
|
|
end
|
|
|
|
def interact(_parent, %{uri: uri}, _resolution) do
|
|
Search.interact(uri)
|
|
end
|
|
end
|