Cqrs.Absinthe.derive_mutation

You're seeing just the macro derive_mutation, go back to Cqrs.Absinthe module for more information.
Link to this macro

derive_mutation(command_module, return_type, opts \\ [])

View Source (macro)

Defines an Absinthe mutation for a Command.

Options

  • :as - The name to use for the mutation. Defaults to the query_module name snake_cased.
  • :then - A function/1 that accepts the result of the command execution. The function should return the standard Absinthe {:ok, response} or {:error, error} tuple.
  • :input_object? - true | false. Defaults to false
    • If true, one arg with the name of :input will be generated.
    • If true, an input_object for the Command is expected to exist. See derive_mutation_input/2.