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

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

Link to this section Summary

Functions

Release a simulator contact or nil if possible for this user

Get current location of the contact

Release a simulator contact or nil if possible for this user

Get the count of contacts filtered by args

Import contacts to the database

Upload a contact phone as opted in

Grab a simulator contact or nil if possible for this user

Release a simulator contact or nil if possible for this user

Link to this section Functions

Link to this function

contact_history(_, args, _)

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

Release a simulator contact or nil if possible for this user

Link to this function

contact_location(_, map1, map2)

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

Get current location of the contact

Link to this function

count_contact_history(_, args, _)

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

Release a simulator contact or nil if possible for this user

Link to this function

count_contacts(_, args, _)

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

Get the count of contacts filtered by args

Link to this function

import_contacts(_, contact_attrs, map)

View Source
@spec import_contacts(
  Absinthe.Resolution.t(),
  %{data: String.t(), id: integer(), type: :data | :file_path | :url},
  %{context: map()}
) :: {:ok, any()} | {:error, any()}

Import contacts to the database

Link to this function

optin_contact(_, params, _)

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

Upload a contact phone as opted in

Link to this function

simulator_get(_, params, map)

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

Grab a simulator contact or nil if possible for this user

Link to this function

simulator_release(_, params, map)

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

Release a simulator contact or nil if possible for this user