Class: Graphql::Generators::Install::MutationRootGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Graphql::Generators::Install::MutationRootGenerator
- Includes:
- Core
- Defined in:
- lib/generators/graphql/install/mutation_root_generator.rb
Instance Method Summary collapse
Methods included from Core
#create_dir, #insert_root_type, #module_namespacing_when_supported, #schema_file_path
Instance Method Details
#generate ⇒ Object
25 26 27 28 29 30 |
# File 'lib/generators/graphql/install/mutation_root_generator.rb', line 25 def generate create_dir("#{[:directory]}/mutations") template("base_mutation.erb", "#{[:directory]}/mutations/base_mutation.rb", { skip: true }) template("mutation_type.erb", "#{[:directory]}/types/mutation_type.rb", { skip: true }) insert_root_type('mutation', 'MutationType') end |