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
@spec clear_messages(Absinthe.Resolution.t(), %{contact_id: integer()}, %{ context: map() }) :: {:ok, any()} | {:error, any()}
Delete all messages of a contact
@spec count_messages(Absinthe.Resolution.t(), map(), %{context: map()}) :: {:ok, integer()}
Get the count of messages filtered by args
@spec count_messages_media(Absinthe.Resolution.t(), map(), %{context: map()}) :: {:ok, integer()}
Get the count of message media
@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
@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
@spec validate_media(Absinthe.Resolution.t(), map(), %{context: map()}) :: {:ok, map()}
Validate a media url and type