2020-01-26 20:34:25 +01:00
|
|
|
defmodule Mobilizon.GraphQL.Schema.Actors.ApplicationType do
|
2019-12-03 11:29:51 +01:00
|
|
|
@moduledoc """
|
|
|
|
Schema representation for Group.
|
|
|
|
"""
|
|
|
|
|
2020-11-26 11:41:13 +01:00
|
|
|
alias Mobilizon.GraphQL.Resolvers.Media
|
2019-12-03 11:29:51 +01:00
|
|
|
use Absinthe.Schema.Notation
|
|
|
|
|
|
|
|
@desc """
|
|
|
|
Represents an application
|
|
|
|
"""
|
|
|
|
object :application do
|
2023-03-17 18:10:59 +01:00
|
|
|
meta(:authorize, :all)
|
2019-12-03 11:29:51 +01:00
|
|
|
interfaces([:actor])
|
|
|
|
|
|
|
|
field(:id, :id, description: "Internal ID for this application")
|
|
|
|
field(:url, :string, description: "The ActivityPub actor's URL")
|
|
|
|
field(:type, :actor_type, description: "The type of Actor (Person, Group,…)")
|
|
|
|
field(:name, :string, description: "The actor's displayed name")
|
|
|
|
field(:domain, :string, description: "The actor's domain if (null if it's this instance)")
|
|
|
|
field(:local, :boolean, description: "If the actor is from this instance")
|
|
|
|
field(:summary, :string, description: "The actor's summary")
|
|
|
|
field(:preferred_username, :string, description: "The actor's preferred username")
|
|
|
|
|
|
|
|
field(:manually_approves_followers, :boolean,
|
|
|
|
description: "Whether the actors manually approves followers"
|
|
|
|
)
|
|
|
|
|
|
|
|
field(:suspended, :boolean, description: "If the actor is suspended")
|
|
|
|
|
2020-11-26 11:41:13 +01:00
|
|
|
field(:avatar, :media, description: "The actor's avatar media")
|
|
|
|
field(:banner, :media, description: "The actor's banner media")
|
2019-12-03 11:29:51 +01:00
|
|
|
|
|
|
|
# These one should have a privacy setting
|
2022-08-26 16:08:58 +02:00
|
|
|
field(:followers_count, :integer, description: "Number of followers for this actor")
|
|
|
|
field(:following_count, :integer, description: "Number of actors following this actor")
|
2020-11-23 12:31:15 +01:00
|
|
|
|
|
|
|
field(:media_size, :integer,
|
2020-11-26 11:41:13 +01:00
|
|
|
resolve: &Media.actor_size/3,
|
2020-11-23 12:31:15 +01:00
|
|
|
description: "The total size of the media from this actor"
|
|
|
|
)
|
2019-12-03 11:29:51 +01:00
|
|
|
end
|
|
|
|
end
|