Class: Graphql::Generators::ScalarGenerator

Inherits:
TypeGeneratorBase
  • Object
show all
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

normalize_type_expression

Methods included from Core

#create_dir, #create_mutation_root_type, #insert_root_type, #schema_file_path

Instance Method Details

#create_type_fileObject



15
16
17
# File 'lib/generators/graphql/scalar_generator.rb', line 15

def create_type_file
  template "scalar.erb", "#{options[:directory]}/types/#{type_file_name}.rb"
end