The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

GraphQL::Type::Enum - GraphQL enum type

SYNOPSIS

  use GraphQL::Type::Enum;
  my %text2value;
  my $type = GraphQL::Type::Enum->new(
    name => 'Enum',
    values => { value1 => {}, value2 => { value => 'yo' } },
  );

ATTRIBUTES

Has name, description from GraphQL::Role::Named.

values

Hash-ref mapping value labels to a hash-ref description. Description keys, all optional:

value

Perl value of that item. If not specified, will be the string name of the value. Integers are often useful.

deprecation_reason

Reason if deprecated.

description

Description.