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

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

Link to this section Summary

Functions

Get the collection count

Get the count of saved_searches

Get a specific saved_search by id

Get the list of saved_searches

Link to this section Functions

Link to this function

collection_stats(_, map, _)

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

Get the collection count

Link to this function

count_saved_searches(_, args, _)

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

Get the count of saved_searches

Link to this function

saved_search(_, map1, map2)

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

Get a specific saved_search by id

Link to this function

saved_searches(_, args, _)

View Source
@spec saved_searches(Absinthe.Resolution.t(), map(), %{context: map()}) ::
  {:ok, [Glific.Searches.SavedSearch]}

Get the list of saved_searches