GraphQ...onNull(3pm)
β¨ GraphQL::Type::NonNull β bestie edition β¨
okay so this is GraphQL::Type::NonNull, a lil Perl module from the User Contributed Perl Documentation collection, and it's literally the type that says "nope, not null, we don't do that here" π
π NAME π
GraphQL::Type::NonNull β a GraphQL type that is the non-null version of another type. it's giving "wrapper with boundaries" fr fr.
πΈ SYNOPSIS πΈ
here's the whole vibe in two lines, no cap:
use GraphQL::Type::NonNull;
my $type = GraphQL::Type::NonNull->new(of => $other_type);
that's it. that's the whole entrance. slay.
π¦ DESCRIPTION π¦
so basically this is a type that wraps another type. it's a wrapper. a little cozy jacket for a type. and what that jacket MEANS is that the data cannot be a null value. periodt. no nulls allowed, not even a lil one π
π ATTRIBUTES π
π of
the GraphQL type object of which this thing is the non-null version. like, the original type. the one getting the non-null glow-up β¨
π METHODS π
π BUILD
a Moo method that applies the relevant roles. Moo does its lil magic and BUILD is where the roles get applied, iykyk.
β to_string
part of serialisation. it does the stringifying thing.
π is_valid
true if the given Perl value is a valid value for this type. returns true. or not. depending. that's the whole bit π«Ά
π name
the "name" of the type that this object is a non-null version of. so it's the name of the underlying type, not a new made-up name. cute.
π quick reminder bestie: every method and attribute here is doing exactly what the original says, i didn't add a single thing, i just made it cute. don't come for me π
perl v5.34.0 Β· 2022-03-27 Β· and that's the whole page babes, mwah ππβ¨
π¦ where this page comes from
- debian bookworm: libgraphql-perl 0.54-1 Β· Artistic-2.0
- debian trixie: libgraphql-perl 0.54-1 Β· Artistic-2.0
- ubuntu noble: libgraphql-perl 0.54-1 Β· Artistic-2.0
- ubuntu resolute: libgraphql-perl 0.54-1 Β· Artistic-2.0
- ubuntu stonking: libgraphql-perl 0.54-1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms