Introduce activity filters

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-03-09 16:20:58 +01:00
parent aa2c79d312
commit d8e4d6c24f
9 changed files with 243 additions and 11 deletions

View File

@@ -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)

View File

@@ -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