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

Handles the person-related GraphQL calls

Summary

Functions

This function is used to create more identities from an existing user

This function is used to delete an existing identity

Returns the current actor for the currently logged-in user

Returns the list of identities for the logged-in user

Returns this person's group follows

Returns this person's group memberships

Returns the participations, optionally restricted to an event

This function is used to register a person afterwards the user has been created (but not activated)

This function is used to update an existing identity

Functions

Link to this function

create_person(parent, args, resolution)

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

This function is used to create more identities from an existing user

Link to this function

delete_person(parent, args, resolution)

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

This function is used to delete an existing identity

Link to this function

fetch_person(parent, arg2, arg3)

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

Find a person

Link to this function

get_current_person(parent, args, arg3)

View Source
@spec get_current_person(any(), any(), Absinthe.Resolution.t()) ::
  {:error, :unauthenticated | :no_current_person}
  | {:ok, Mobilizon.Actors.Actor.t()}

Returns the current actor for the currently logged-in user

Link to this function

get_person(parent, arg2, arg3)

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

Get a person

Link to this function

identities(parent, args, arg3)

View Source
@spec identities(any(), any(), Absinthe.Resolution.t()) ::
  {:error, :unauthenticated} | {:ok, [Mobilizon.Actors.Actor.t()]}

Returns the list of identities for the logged-in user

Link to this function

list_persons(parent, arg2, arg3)

View Source
@spec list_persons(any(), map(), Absinthe.Resolution.t()) ::
  {:ok, Mobilizon.Storage.Page.t(Mobilizon.Actors.Actor.t())}
  | {:error, :unauthorized | :unauthenticated}
Link to this function

organized_events_for_person(person, arg2, arg3)

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

person_follows(person, map1, map2)

View Source
@spec person_follows(Mobilizon.Actors.Actor.t(), map(), map()) ::
  {:ok, Mobilizon.Storage.Page.t(Mobilizon.Actors.Follower.t())}
  | {:error, String.t()}

Returns this person's group follows

Link to this function

person_memberships(person, args, map)

View Source
@spec person_memberships(Mobilizon.Actors.Actor.t(), map(), map()) ::
  {:ok, Mobilizon.Storage.Page.t(Mobilizon.Actors.Member.t())}
  | {:error, String.t()}

Returns this person's group memberships

Link to this function

person_participations(person, map1, map2)

View Source
@spec person_participations(
  Mobilizon.Actors.Actor.t(),
  map(),
  Absinthe.Resolution.t()
) ::
  {:ok, Mobilizon.Storage.Page.t(Mobilizon.Events.Participant.t())}
  | {:error, :unauthorized | String.t()}

Returns the participations, optionally restricted to an event

Link to this function

register_person(parent, args, map)

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

This function is used to register a person afterwards the user has been created (but not activated)

Link to this function

update_person(parent, args, resolution)

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

This function is used to update an existing identity

Link to this function

user_for_person(arg1, args, arg3)

View Source
@spec user_for_person(Mobilizon.Actors.Actor.t(), map(), Absinthe.Resolution.t()) ::
  {:ok, Mobilizon.Users.User.t() | nil} | {:error, String.t() | nil}