class GraphQL::Schema::Enum

Extend this class to define GraphQL enums in your schema.

By default, GraphQL enum values are translated into Ruby strings. You can provide a custom value with the value: keyword.

Examples

Example: # equivalent to

# enum PizzaTopping {
#   MUSHROOMS
#   ONIONS
#   PEPPERS
# }
class PizzaTopping < GraphQL::Schema::Enum
  value :MUSHROOMS
  value :ONIONS
  value :PEPPERS
end