View Source Mobilizon.GraphQL.Resolvers.Resource (Mobilizon v5.0.0-beta.1)

Handles the resources-related GraphQL calls

Summary

Functions

Link to this function

create_resource(parent, args, resolution)

View Source
@spec create_resource(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, Mobilizon.Resources.Resource.t()} | {:error, String.t()}
Link to this function

delete_resource(parent, arg2, resolution)

View Source
@spec delete_resource(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, Mobilizon.Resources.Resource.t()} | {:error, String.t()}
Link to this function

find_resources_for_group(group, arg2, resolution)

View Source

Find resources for group.

Returns only if actor requesting is a member of the group

Link to this function

find_resources_for_parent(parent, arg2, resolution)

View Source
Link to this function

get_resource(parent, arg2, resolution)

View Source
@spec get_resource(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, Mobilizon.Resources.Resource.t()}
  | {:error, :group_not_found | :resource_not_found | String.t()}
Link to this function

preview_resource_link(parent, arg2, resolution)

View Source
@spec preview_resource_link(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, Mobilizon.Resources.Resource.Metadata.t()}
  | {:error, String.t() | :unknown_resource}
Link to this function

proxyify_pictures(metadata, args, map)

View Source
@spec proxyify_pictures(
  Mobilizon.Resources.Resource.Metadata.t(),
  map(),
  Absinthe.Resolution.t()
) ::
  {:ok, String.t() | nil} | {:error, String.t()}
Link to this function

update_resource(parent, args, resolution)

View Source
@spec update_resource(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, Mobilizon.Resources.Resource.t()} | {:error, String.t()}