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

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

Link to this section Summary

Functions

Get the list of roles filtered by args

Get a specific role by id

Get the list of roles filtered by args

Updates the role

Link to this section Functions

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

Get the list of roles filtered by args

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

Get a specific role by id

@spec roles(Absinthe.Resolution.t(), map(), %{context: map()}) ::
  {:ok, [Glific.AccessControl.Role.t()]}

Get the list of roles filtered by args

Link to this function

update_role(_, map1, map2)

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

Updates the role