Riptide.Mutation.put_merge

You're seeing just the function put_merge, go back to Riptide.Mutation module for more information.

Specs

put_merge([String.t()], any()) :: t()

Creates a new mutation and puts a value to be merged

Examples

iex> Riptide.Mutation.put_merge(["a", "b"], 1)
%Riptide.Mutation{delete: %{}, merge: %{"a" => %{"b" => 1}}}
Link to this function

put_merge(input, path, value)

View Source

Specs

put_merge(t(), [String.t()], any()) :: t()

Adds a merge value to the input mutation

Examples

iex> mutation = Riptide.Mutation.put_merge(["a", "b"], 1)
iex> Riptide.Mutation.put_merge(mutation, ["a", "c"], 2)
%Riptide.Mutation{delete: %{}, merge: %{"a" => %{"b" => 1, "c" => 2}}}