Sha256: 3e05a49609c9f7980f4b17ce90f4e06e5fcad60b4a2f8d66b7bec6786c78f2aa

Contents?: true

Size: 779 Bytes

Versions: 6

Compression:

Stored size: 779 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
    # 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 -%>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ibrain-core-0.3.3 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.3.2.pre.rc.4 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.3.2.pre.rc.3 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.3.2.pre.rc lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.3.2 lib/generators/ibrain/graphql/templates/mutation.erb
ibrain-core-0.3.1 lib/generators/ibrain/graphql/templates/mutation.erb