Class: Graphql::Generators::UnionGenerator
- Inherits:
 - 
      TypeGeneratorBase
      
        
- Object
 - Rails::Generators::Base
 - TypeGeneratorBase
 - Graphql::Generators::UnionGenerator
 
 
- Defined in:
 - lib/generators/graphql/union_generator.rb
 
Overview
Generate a union type by name with the specified member types.
rails g graphql:union SearchResultType ImageType AudioType
Instance Method Summary collapse
Methods inherited from TypeGeneratorBase
Methods included from Core
#create_dir, #create_mutation_root_type, #insert_root_type, #module_namespacing_when_supported, #schema_file_path
Instance Method Details
#create_type_file ⇒ Object
      22 23 24  | 
    
      # File 'lib/generators/graphql/union_generator.rb', line 22 def create_type_file template "union.erb", "#{[:directory]}/types/#{type_file_name}.rb" end  |