class Graphql::Generators::UnionGenerator
Generate a union type by name with the specified member types.
“‘ rails g graphql:union SearchResultType ImageType AudioType “`
Private Instance Methods
graphql_type()
click to toggle source
# File lib/generators/graphql/union_generator.rb, line 24 def graphql_type "union" end
normalized_possible_types()
click to toggle source
# File lib/generators/graphql/union_generator.rb, line 28 def normalized_possible_types custom_fields.map { |t| self.class.normalize_type_expression(t, mode: :ruby)[0] } end