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
Find a person
Returns the current actor for the currently logged-in user
Get a person
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
@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
@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
@spec fetch_person(any(), map(), Absinthe.Resolution.t()) :: {:ok, Mobilizon.Actors.Actor.t()} | {:error, String.t() | :unauthorized | :unauthenticated}
Find a person
@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
@spec get_person(any(), map(), Absinthe.Resolution.t()) :: {:ok, Mobilizon.Actors.Actor.t()} | {:error, String.t() | :unauthorized}
Get a person
@spec identities(any(), any(), Absinthe.Resolution.t()) :: {:error, :unauthenticated} | {:ok, [Mobilizon.Actors.Actor.t()]}
Returns the list of identities for the logged-in user
@spec list_persons(any(), map(), Absinthe.Resolution.t()) :: {:ok, Mobilizon.Storage.Page.t(Mobilizon.Actors.Actor.t())} | {:error, :unauthorized | :unauthenticated}
@spec organized_events_for_person( Mobilizon.Actors.Actor.t(), map(), Absinthe.Resolution.t() ) :: {:ok, Mobilizon.Storage.Page.t(Event.t())} | {:error, :unauthorized}
@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
@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
@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
@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)
@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
@spec user_for_person(Mobilizon.Actors.Actor.t(), map(), Absinthe.Resolution.t()) :: {:ok, Mobilizon.Users.User.t() | nil} | {:error, String.t() | nil}