Glific v0.3.1 GlificWeb.Resolvers.Groups View Source

Group Resolver which sits between the GraphQL schema and Glific Group Context API. This layer basically stiches together one or more calls to resolve the incoming queries.

Link to this section Summary

Functions

Get count of group contacts

Get the count of groups filtered by args

Creates an contact group entry

Creates an group

Creates an user group entry

Deletes an contact group entry

Deletes an group

Deletes an user group entry

Get a specific group by id

Get the list of groups filtered by args

Updates an group

Get count of group users

Link to this section Functions

Link to this function

contacts_count(_, params, _)

View Source

Specs

contacts_count(Absinthe.Resolution.t(), map(), %{context: map()}) ::
  {:ok, integer()}

Get count of group contacts

Link to this function

count_groups(_, args, context)

View Source

Specs

count_groups(Absinthe.Resolution.t(), map(), %{context: map()}) ::
  {:ok, integer()}

Get the count of groups filtered by args

Link to this function

create_contact_group(_, map, _)

View Source

Specs

create_contact_group(Absinthe.Resolution.t(), %{input: map()}, %{context: map()}) ::
  {:ok, any()} | {:error, any()}

Creates an contact group entry

Specs

create_group(Absinthe.Resolution.t(), %{input: map()}, %{context: map()}) ::
  {:ok, any()} | {:error, any()}

Creates an group

Link to this function

create_user_group(_, map, _)

View Source

Specs

create_user_group(Absinthe.Resolution.t(), %{input: map()}, %{context: map()}) ::
  {:ok, any()} | {:error, any()}

Creates an user group entry

Link to this function

delete_contact_group(_, map, _)

View Source

Specs

delete_contact_group(Absinthe.Resolution.t(), %{id: integer()}, %{
  context: map()
}) :: {:ok, any()} | {:error, any()}

Deletes an contact group entry

Specs

delete_group(Absinthe.Resolution.t(), %{id: integer()}, %{context: map()}) ::
  {:ok, any()} | {:error, any()}

Deletes an group

Link to this function

delete_user_group(_, map, _)

View Source

Specs

delete_user_group(Absinthe.Resolution.t(), %{id: integer()}, %{context: map()}) ::
  {:ok, any()} | {:error, any()}

Deletes an user group entry

Specs

group(Absinthe.Resolution.t(), %{id: integer()}, %{context: map()}) ::
  {:ok, any()} | {:error, any()}

Get a specific group by id

Link to this function

groups(_, args, context)

View Source

Specs

groups(Absinthe.Resolution.t(), map(), %{context: map()}) ::
  {:ok, [Glific.Groups.Group]}

Get the list of groups filtered by args

Specs

update_group(Absinthe.Resolution.t(), %{id: integer(), input: map()}, %{
  context: map()
}) :: {:ok, any()} | {:error, any()}

Updates an group

Link to this function

users_count(_, params, _)

View Source

Specs

users_count(Absinthe.Resolution.t(), map(), %{context: map()}) ::
  {:ok, integer()}

Get count of group users