Class: Graphql::Generators::ScalarGenerator
- Inherits:
-
TypeGeneratorBase
- Object
- Rails::Generators::Base
- TypeGeneratorBase
- Graphql::Generators::ScalarGenerator
- Defined in:
- lib/generators/graphql/scalar_generator.rb
Overview
Generate a scalar type by given name.
rails g graphql:scalar Date
Instance Method Summary collapse
Methods inherited from TypeGeneratorBase
Methods included from Core
#create_dir, #create_mutation_root_type, #insert_root_type, #schema_file_path
Instance Method Details
#create_type_file ⇒ Object
15 16 17 |
# File 'lib/generators/graphql/scalar_generator.rb', line 15 def create_type_file template "scalar.erb", "#{[:directory]}/types/#{type_file_name}.rb" end |