# frozen_string_literal: true <% module_namespacing_when_supported do -%> module Mutations class <%= mutation_name %> < Ibrain::Mutations::BaseMutation # TODO: define description describe about this mutation # description # TODO: define return fields field :<%= model_name.underscore %>, Types::<%= model_name %>Type, null: false, description: 'Record Type for mutation response' # TODO: define arguments # argument :name, String, required: true # argument :<%= model_name.underscore %>, Types::Input::<%= model_name %>Input, required: true # TODO: define resolve method def resolve(args) # TODO: define logic inside repository # Something like Repository.new(current_user, Post.new).create(args) end end end <% end -%>