Introduce activity filters
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -19,6 +19,11 @@ defmodule Mobilizon.GraphQL.Schema.ActivityType do
|
||||
value(:member, description: "Activities concerning members")
|
||||
end
|
||||
|
||||
enum :activity_author do
|
||||
value(:self, description: "Activities created by the current actor")
|
||||
value(:by, description: "Activities created by others")
|
||||
end
|
||||
|
||||
object :activity_param_item do
|
||||
field(:key, :string)
|
||||
field(:value, :string)
|
||||
|
||||
@@ -153,6 +153,7 @@ defmodule Mobilizon.GraphQL.Schema.Actors.GroupType do
|
||||
arg(:limit, :integer, default_value: 10, description: "The limit of activity items per page")
|
||||
|
||||
arg(:type, :activity_type, description: "Filter by type of activity")
|
||||
arg(:author, :activity_author, description: "Filter by activity author")
|
||||
resolve(&Activity.group_activity/3)
|
||||
description("The group activity")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user