class Graphql::Generators::UnionGenerator

“‘
rails g graphql:union SearchResultType ImageType AudioType
“`
with the specified member types.
Generate a union type by name

def create_type_file

def create_type_file
  template "union.erb", "app/graphql/types/#{type_file_name}.rb"
end

def normalized_possible_types

def normalized_possible_types
  possible_types.map { |t| self.class.normalize_type_expression(t, mode: :ruby) }
end