class Graphql::Generators::EnumGenerator
“‘
rails g graphql:enum ProgrammingLanguage RUBY PYTHON PERL PERL6:“PERL”
“`
To add a `value:` option, add another value after a `:`.
Generate an enum type by name, with the given values.
def graphql_type
def graphql_type "enum" end
def prepared_values
def prepared_values custom_fields.map { |v| v.split(":", 2) } end