Improve GraphQL documentation and cleanup API

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-11-19 17:06:28 +01:00
parent e8a3b6aa94
commit 3eacbb2ca3
87 changed files with 6542 additions and 6314 deletions

View File

@@ -62,18 +62,21 @@ defmodule Mobilizon.GraphQL.Schema.ActorInterface do
end
object :actor_mutations do
@desc "Suspend an actor"
field :suspend_profile, :deleted_object do
arg(:id, non_null(:id), description: "The profile ID to suspend")
arg(:id, non_null(:id), description: "The remote profile ID to suspend")
resolve(&ActorResolver.suspend_profile/3)
end
@desc "Unsuspend an actor"
field :unsuspend_profile, :actor do
arg(:id, non_null(:id), description: "The profile ID to unsuspend")
arg(:id, non_null(:id), description: "The remote profile ID to unsuspend")
resolve(&ActorResolver.unsuspend_profile/3)
end
@desc "Refresh a profile"
field :refresh_profile, :actor do
arg(:id, non_null(:id))
arg(:id, non_null(:id), description: "The remote profile ID to refresh")
resolve(&ActorResolver.refresh_profile/3)
end
end