Sha256: 402e927c407b1efe3d0fe96b50c0b917eccd99798dd48c24b69ca4e404b5886f

Contents?: true

Size: 680 Bytes

Versions: 17

Compression:

Stored size: 680 Bytes

Contents

# 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

    # 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 -%>

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ibrain-core-0.3.0 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.2.9 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.2.8 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.2.7 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.2.6 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.2.5 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.2.4 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.2.3 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.2.2 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.2.1 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.2.0 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.1.9 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.1.8 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.1.7 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.1.6 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.1.5 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.1.4 lib/generators/ibrain/graphql/templates/mutation.erb