Sha256: 8c2d4e636aedeb9f80cec8577757b5aa77aab29d3f3d2b57127ba4bff3afa6ad

Contents?: true

Size: 395 Bytes

Versions: 11

Compression:

Stored size: 395 Bytes

Contents

# frozen_string_literal: true

# Comment
module Mutations
  module Admin
    class <%= class_name %>s::Delete<%= class_name %> < BaseAdminMutation
      type Types::Admin::<%= class_name %>Type

      def resolve(id:)
        <%= class_name.underscore %> = <%= class_name %>.find(id)
        <%= class_name.underscore %>.destroy!
        <%= class_name.underscore %>
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
graphql_scaffold_fan-0.3.3 lib/generators/templates/mutation_delete.haml
graphql_scaffold_fan-0.3.2 lib/generators/templates/mutation_delete.haml
graphql_scaffold_fan-0.3.1 lib/generators/templates/mutation_delete.haml
graphql_scaffold_fan-0.3.0 lib/generators/templates/mutation_delete.haml
graphql_scaffold_fan-0.2.9 lib/generators/templates/mutation_delete.haml
graphql_scaffold_fan-0.2.8 lib/generators/templates/mutation_delete.haml
graphql_scaffold_fan-0.2.7 lib/generators/templates/mutation_delete.haml
graphql_scaffold_fan-0.2.6 lib/generators/templates/mutation_delete.haml
graphql_scaffold_fan-0.2.5 lib/generators/templates/mutation_delete.haml
graphql_scaffold_fan-0.2.4 lib/generators/templates/mutation_delete.haml
graphql_scaffold_fan-0.2.3 lib/generators/templates/mutation_delete.haml