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

NAME

GraphQL::Type::List - GraphQL type that is a list of another type

SYNOPSIS

  use GraphQL::Type::List;
  my $type = GraphQL::Type::List->new(of => $other_type);

DESCRIPTION

Type that is a wrapper for the type it is a list of. If the wrapped type has any of these roles, it will assume them: GraphQL::Role::Input, GraphQL::Role::Output, GraphQL::Role::Nullable.

ATTRIBUTES

of

GraphQL type object of which this is a list.

METHODS

BUILD

Moo method that applies the relevant roles.

to_string

Part of serialisation.

is_valid

True if given Perl array-ref is a valid value for this type.

uplift

Turn given Perl entity into valid value for this type if possible. Mainly to promote single value into a list if type dictates.