Glific v0.3.1 GlificWeb.Resolvers.Templates View Source

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

Link to this section Summary

Functions

Get the count of sessiont templates filtered by args

Converting a message to message template

Get a specific session template by id

Get the list of session templates filtered by args

Link to this section Functions

Link to this function

count_session_templates(_, args, context)

View Source

Specs

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

Get the count of sessiont templates filtered by args

Link to this function

create_template_from_message(_, params, _)

View Source

Specs

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

Converting a message to message template

Link to this function

session_template(_, map, _)

View Source

Specs

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

Get a specific session template by id

Link to this function

session_templates(_, args, context)

View Source

Specs

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

Get the list of session templates filtered by args