View Source GlificWeb.Resolvers.Flows (Glific v5.1.6)
Flow Resolver which sits between the GraphQL schema and Glific Flow Context API. This layer basically stitches together one or more calls to resolve the incoming queries.
Link to this section Summary
Functions
Get broadcast stats for a flow
Make a copy a flow
Get the count of flows filtered by args
Get a specific flow by id
Grab a flow or nil if possible for this user
Release a flow or nil if possible for this user
Get the list of flows
Publish a flow
Reset the flow counts for a specific flow
Resume a flow for a contact
Start a flow for a contact
Start a flow for all contacts of a group
Terminate all flows for a contact
Link to this section Functions
@spec broadcast_stats(Absinthe.Resolution.t(), map(), %{context: map()}) :: {:ok, any()} | {:error, any()}
Get broadcast stats for a flow
@spec copy_flow(Absinthe.Resolution.t(), %{id: integer(), input: map()}, %{ context: map() }) :: {:ok, any()} | {:error, any()}
Make a copy a flow
@spec count_flows(Absinthe.Resolution.t(), map(), %{context: map()}) :: {:ok, integer()}
Get the count of flows filtered by args
@spec flow(Absinthe.Resolution.t(), %{id: integer()}, %{context: map()}) :: {:ok, any()} | {:error, any()}
Get a specific flow by id
@spec flow_get(Absinthe.Resolution.t(), map(), %{context: map()}) :: {:ok, any()} | {:error, any()}
Grab a flow or nil if possible for this user
@spec flow_release(Absinthe.Resolution.t(), map(), %{context: map()}) :: {:ok, any()} | {:error, any()}
Release a flow or nil if possible for this user
@spec flows(Absinthe.Resolution.t(), map(), %{context: map()}) :: {:ok, [Glific.Flows.Flow]}
Get the list of flows
@spec publish_flow(Absinthe.Resolution.t(), %{uuid: String.t()}, %{context: map()}) :: {:ok, any()} | {:error, any()}
Publish a flow
@spec reset_flow_count(Absinthe.Resolution.t(), map(), %{context: map()}) :: {:ok, any()} | {:error, any()}
Reset the flow counts for a specific flow
@spec resume_contact_flow( Absinthe.Resolution.t(), %{flow_id: integer() | String.t(), contact_id: integer(), result: map()}, %{context: map()} ) :: {:ok, any()} | {:error, any()}
Resume a flow for a contact
@spec start_contact_flow( Absinthe.Resolution.t(), %{flow_id: integer() | String.t(), contact_id: integer()}, %{context: map()} ) :: {:ok, any()} | {:error, any()}
Start a flow for a contact
@spec start_group_flow( Absinthe.Resolution.t(), %{flow_id: integer(), group_id: integer()}, %{ context: map() } ) :: {:ok, any()} | {:error, any()}
Start a flow for all contacts of a group
@spec terminate_contact_flows( Absinthe.Resolution.t(), %{contact_id: integer()}, map() ) :: {:ok, any()} | {:error, any()}
Terminate all flows for a contact