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

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

Link to this section Summary

Functions

Delete all messages of a contact

Get the count of messages filtered by args

Get the count of message media

Create and send message to contacts of a group

Get a specific message by id

Get a specific message media by id

Get the list of messages filtered by args

Validate a media url and type

Link to this section Functions

Link to this function

clear_messages(_, map1, map2)

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

Delete all messages of a contact

Link to this function

count_messages(_, args, _)

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

Get the count of messages filtered by args

Link to this function

count_messages_media(_, args, _)

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

Get the count of message media

Link to this function

create_and_send_message_to_group(_, map1, map2)

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

Create and send message to contacts of a group

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

Get a specific message by id

Link to this function

message_media(_, map1, map2)

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

Get a specific message media by id

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

Get the list of messages filtered by args

Link to this function

validate_media(_, args, _)

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

Validate a media url and type