GraphQ...e::List(3pm)

πŸ“¦
version 0.54 Β· 2 versions
  • 0.54 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.53 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

NAME πŸ’–

GraphQL::Type::List β€” it's a GraphQL type that's literally just a list of some other type. bestie, that's the whole vibe. πŸ’…


✨ SYNOPSIS ✨

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

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: a type that is a wrapper for whatever type it's a list of. that's it. that's the girl. πŸŽ€

and here's the iconic part β€” if the wrapped type has any of these roles, this one just assumes them, no questions asked:

  • GraphQL::Role::Input
  • GraphQL::Role::Output

she's a total chameleon. but there's one role she always has, no matter what: GraphQL::Role::Nullable. always. periodt. πŸ’…βœ¨


🌸 ATTRIBUTES 🌸

πŸ“ of

the GraphQL type object that this thing is a list of. like, the what. the main character she's building a list around. 🫢


πŸ’œ METHODS πŸ’œ

BUILD

a Moo method, and its whole job is applying the relevant roles. that's it, she does the role math so you don't have to. πŸ‘‘

to_string

part of serialisation. the way she turns herself into a string… ate. πŸ”₯

is_valid

returns true if the given Perl array-ref is a valid value for this type. basically a vibe check for your array-ref. βœ…

uplift

turns a given Perl entity into a valid value for this type, if possible. mainly there to promote a single value into a list when the type says so. she'll take one lil guy and make him a whole lineup. 🌈

name

the "name" of the type this object is a list of. short, sweet, iconic. ⭐


ngl, if you're reading this, you're probably deep in GraphQL type plumbing, and honestly? respect. 🫢

this page came from the User Contributed Perl Documentation, and it's running on perl v5.34.0, dated 2022-03-27. mwah, love that for us β€” stay slay, bestie. πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from