NAME

GraphQL::Houtou::Type::Enum - GraphQL enum type

SYNOPSIS

my $Episode = GraphQL::Houtou::Type::Enum->new(
  name   => 'Episode',
  values => {
    NEWHOPE => { value => 4 },
    EMPIRE  => { value => 5, description => 'ESB' },
    JEDI    => {},   # value defaults to the name itself
  },
);

DESCRIPTION

Enum values map a GraphQL name to an internal value (defaulting to the name). deprecation_reason on a value marks it @deprecated.

SEE ALSO

GraphQL::Houtou