Riptide.mutation
You're seeing just the function
mutation
, go back to Riptide module for more information.
Specs
mutation(Riptide.Mutation.t(), any()) :: {:ok, Riptide.Mutation.t()} | {:error, any()}
Apply a mutation. This will do following steps in order
- Trigger
Riptide.Interceptor.mutation_before/4
- Trigger
Riptide.Interceptor.mutation_effect/4
- Broadcast mutation to interested processes
- Write mutation to stores
- Trigger
c:Riptide.Interceptor.mutation_after/4
Examples
iex> mut = Riptide.Mutation.put_merge(["foo", "bar"], "hello")
iex> Riptide.mutation(mut)
{:ok, %{
merge: %{
"foo" => %{
"bar" => "hello
}
},
delete: %{}
}}