class Graphql::Generators::EnumGenerator
“‘
rails g graphql:interface NamedEntityType name:String!
“`
with the specified fields.
Generate an interface type by name,
def create_type_file
def create_type_file template "enum.erb", "app/graphql/types/#{type_file_name}.rb" end
def prepared_values
def prepared_values values.map { |v| v.split(":", 2) } end