View Source GlificWeb.Resolvers.Groups (Glific v5.1.6)

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

Link to this section Summary

Functions

Get the list of contact_groups filtered by args

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 group

Get a specific group by id

Get group info by id

Get the list of groups filtered by args

Get the list of organizations groups filtered by args

Updates an group

Get count of group users

Link to this section Functions

Link to this function

contact_groups(_, args, _)

View Source
@spec contact_groups(Absinthe.Resolution.t(), map(), %{context: map()}) ::
  {:ok, any()} | {:error, any()}

Get the list of contact_groups filtered by args

Link to this function

contacts_count(_, params, _)

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

Get count of group contacts

Link to this function

count_groups(_, args, _)

View Source
@spec 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
@spec create_contact_group(Absinthe.Resolution.t(), %{input: map()}, %{context: map()}) ::
  {:ok, any()} | {:error, any()}

Creates an contact group entry

@spec 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
@spec create_user_group(Absinthe.Resolution.t(), %{input: map()}, %{context: map()}) ::
  {:ok, any()} | {:error, any()}

Creates an user group entry

Link to this function

delete_group(_, map1, map2)

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

Deletes an group

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

Get a specific group by id

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

Get group info by id

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

Get the list of groups filtered by args

Link to this function

organization_groups(_, args, _)

View Source
@spec organization_groups(Absinthe.Resolution.t(), map(), %{context: map()}) ::
  {:ok, [Glific.Groups.Group]}

Get the list of organizations groups filtered by args

Link to this function

update_group(_, map1, map2)

View Source
@spec 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
@spec users_count(Absinthe.Resolution.t(), map(), %{context: map()}) ::
  {:ok, integer()}

Get count of group users