View Source GlificWeb.Resolvers.Templates (Glific v5.1.6)
Templates Resolver which sits between the GraphQL schema and Glific Templates Context API. This layer basically stitches together one or more calls to resolve the incoming queries.
Link to this section Summary
Functions
Bulk applying templates from CSV
Get the count of session templates filtered by args
Converting a message to message template
Import pre approved templates
Get a specific session template by id
Get the list of session templates filtered by args
Sync hsm with bsp
Link to this section Functions
@spec bulk_apply_templates(Absinthe.Resolution.t(), %{data: String.t()}, %{ context: map() }) :: {:ok, any()} | {:error, any()}
Bulk applying templates from CSV
@spec count_session_templates(Absinthe.Resolution.t(), map(), %{context: map()}) :: {:ok, integer()}
Get the count of session templates filtered by args
@spec create_template_from_message( Absinthe.Resolution.t(), %{message_id: integer(), input: map()}, %{context: map()} ) :: {:ok, any()} | {:error, any()}
Converting a message to message template
@spec import_templates(Absinthe.Resolution.t(), %{data: String.t()}, %{context: map()}) :: {:ok, any()} | {:error, any()}
Import pre approved templates
@spec session_template(Absinthe.Resolution.t(), %{id: integer()}, %{context: map()}) :: {:ok, any()} | {:error, any()}
Get a specific session template by id
@spec session_templates(Absinthe.Resolution.t(), map(), %{context: map()}) :: {:ok, any()} | {:error, any()}
Get the list of session templates filtered by args
@spec sync_hsm_template(Absinthe.Resolution.t(), map(), %{context: map()}) :: {:ok, any()} | {:error, any()}
Sync hsm with bsp