Class: GqlMutationGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- GqlMutationGenerator
- Defined in:
- lib/generators/gql_mutation/gql_mutation_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_gql_file ⇒ Object
4 5 6 7 8 9 |
# File 'lib/generators/gql_mutation/gql_mutation_generator.rb', line 4 def create_gql_file template 'exemple_mutation.rb', File.join('app/graphql/mutations', "#{file_name.underscore}.rb") template 'exemple_mutation_spec.rb', File.join('spec/graphql/mutations', "#{file_name.underscore}_spec.rb") template 'exemple_mutation.graphql.rb', File.join('spec/fixtures/graphql/mutations/', "#{file_name.underscore}s.graphql") update_mutation_type end |