Class: Graphql::Generators::MutationGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/graphql/mutation_generator.rb

Overview

TODO: What other options should be supported?

Examples:

Generate a Relay::Mutation by name

rails g graphql:mutation CreatePostMutation

Instance Method Summary collapse

Instance Method Details

#create_mutation_fileObject



14
15
16
# File 'lib/generators/graphql/mutation_generator.rb', line 14

def create_mutation_file
  template "mutation.erb", "app/graphql/mutations/#{file_name}.rb"
end