View Source Mobilizon.GraphQL.Resolvers.Group (Mobilizon v4.1.0-alpha.1)

Handles the group-related GraphQL calls.

Summary

Functions

Create a new group. The creator is automatically added as admin

Delete an existing group

Join an existing group

Leave a existing group

Update a group. The creator is automatically added as admin

Functions

Link to this function

create_group(parent, args, arg3)

View Source
@spec create_group(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, Mobilizon.Actors.Actor.t()} | {:error, String.t()}

Create a new group. The creator is automatically added as admin

Link to this function

delete_group(parent, arg2, arg3)

View Source
@spec delete_group(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, %{id: integer()}} | {:error, String.t()}

Delete an existing group

Link to this function

find_events_for_group(group, args, arg3)

View Source
@spec find_events_for_group(
  Mobilizon.Actors.Actor.t(),
  map(),
  Absinthe.Resolution.t() | nil
) ::
  {:ok, Page.t(Event.t())}
Link to this function

find_group(parent, args, arg3)

View Source
@spec find_group(
  any(),
  %{:preferred_username => binary(), optional(any()) => any()},
  Absinthe.Resolution.t()
) :: {:error, :group_not_found} | {:ok, Mobilizon.Actors.Actor.t()}

Find a group

Link to this function

find_group_by_id(parent, arg2, arg3)

View Source
Link to this function

follow_group(parent, arg2, arg3)

View Source
@spec follow_group(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, Mobilizon.Actors.Follower.t()} | {:error, String.t()}

Follow a group

Link to this function

get_group(parent, map1, map2)

View Source
@spec get_group(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, Mobilizon.Actors.Actor.t()} | {:error, String.t()}

Get a group

Link to this function

join_group(parent, args, arg3)

View Source
@spec join_group(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, Mobilizon.Actors.Member.t()} | {:error, String.t()}

Join an existing group

Link to this function

leave_group(parent, arg2, arg3)

View Source
@spec leave_group(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, Mobilizon.Actors.Member.t()} | {:error, String.t()}

Leave a existing group

Link to this function

list_groups(parent, arg2, arg3)

View Source
@spec list_groups(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, Page.t(Mobilizon.Actors.Actor.t())} | {:error, String.t()}

Lists all groups

Link to this function

unfollow_group(parent, arg2, arg3)

View Source
@spec unfollow_group(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, Mobilizon.Actors.Follower.t()} | {:error, String.t()}

Unfollow a group

Link to this function

update_group(parent, args, arg3)

View Source
@spec update_group(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, Mobilizon.Actors.Actor.t()} | {:error, String.t()}

Update a group. The creator is automatically added as admin

Link to this function

update_group_follow(parent, arg2, arg3)

View Source
@spec update_group_follow(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, Mobilizon.Actors.Member.t()} | {:error, String.t()}

Update a group follow