Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-10-17 16:41:31 +02:00
parent 0613f7f736
commit b5672cee7e
108 changed files with 5221 additions and 1318 deletions

View File

@@ -8,7 +8,7 @@ defmodule Mobilizon.GraphQL.Schema.UserType do
alias Mobilizon.Events
alias Mobilizon.GraphQL.Resolvers.Application, as: ApplicationResolver
alias Mobilizon.GraphQL.Resolvers.{Media, User}
alias Mobilizon.GraphQL.Resolvers.{Conversation, Media, User}
alias Mobilizon.GraphQL.Resolvers.Users.ActivitySettings
alias Mobilizon.GraphQL.Schema
@@ -191,6 +191,19 @@ defmodule Mobilizon.GraphQL.Schema.UserType do
) do
resolve(&ApplicationResolver.get_user_applications/3)
end
@desc "The list of conversations this person has"
field(:conversations, :paginated_conversation_list,
meta: [private: true, rule: :"read:profile:conversations"]
) do
arg(:page, :integer,
default_value: 1,
description: "The page in the conversations list"
)
arg(:limit, :integer, default_value: 10, description: "The limit of conversations per page")
resolve(&Conversation.list_conversations/3)
end
end
@desc "The list of roles an user can have"