View Source Mobilizon.GraphQL.Resolvers.Resource (Mobilizon v5.0.0-beta.1)
Handles the resources-related GraphQL calls
Summary
Functions
Find resources for group.
Functions
@spec create_resource(any(), map(), Absinthe.Resolution.t()) :: {:ok, Mobilizon.Resources.Resource.t()} | {:error, String.t()}
@spec delete_resource(any(), map(), Absinthe.Resolution.t()) :: {:ok, Mobilizon.Resources.Resource.t()} | {:error, String.t()}
@spec find_resources_for_group( Mobilizon.Actors.Actor.t(), map(), Absinthe.Resolution.t() ) :: {:ok, Mobilizon.Storage.Page.t(Mobilizon.Resources.Resource.t())}
Find resources for group.
Returns only if actor requesting is a member of the group
@spec find_resources_for_parent( Mobilizon.Resources.Resource.t(), map(), Absinthe.Resolution.t() ) :: {:ok, Mobilizon.Storage.Page.t(Mobilizon.Resources.Resource.t())}
@spec get_resource(any(), map(), Absinthe.Resolution.t()) :: {:ok, Mobilizon.Resources.Resource.t()} | {:error, :group_not_found | :resource_not_found | String.t()}
@spec preview_resource_link(any(), map(), Absinthe.Resolution.t()) :: {:ok, Mobilizon.Resources.Resource.Metadata.t()} | {:error, String.t() | :unknown_resource}
@spec proxyify_pictures( Mobilizon.Resources.Resource.Metadata.t(), map(), Absinthe.Resolution.t() ) :: {:ok, String.t() | nil} | {:error, String.t()}
@spec update_resource(any(), map(), Absinthe.Resolution.t()) :: {:ok, Mobilizon.Resources.Resource.t()} | {:error, String.t()}