GraphQ...e::Leaf(3pm)
π NAME π
GraphQL::Role::Leaf β it's the GraphQL "leaf" object role, bestie π
Like, this page lives in the User Contributed Perl Documentation section, so that's GraphQL::Role::Leaf(3pm) to the perl crowd. It's short, it's sweet, it's giving tiny-but-mighty. π§
β¨ SYNOPSIS β¨
Okay so here's the whole vibe, fr fr:
with qw(GraphQL::Role::Leaf);
# or runtime
Role::Tiny->apply_roles_to_object($foo, qw(GraphQL::Role::Leaf));
So you can either pull it in at compose-time with with and the role name, or β if you're feeling spontaneous, main character energy β apply it to an object at runtime through Role::Tiny->apply_roles_to_object, passing your object and the role name. Both slay. π
πΈ DESCRIPTION πΈ
It allows type constraints for leaf objects. That's it, that's the whole thing, no cap. π¦
Tiny role, big purpose. iykyk. β¨
π Not me writing a whole page for four lines of docs β obsessed with the efficiency honestly.
Signing off, bestie: this was shipped as part of perl v5.34.0, dated 2022-03-27, page GraphQ...e::Leaf(3pm). Go forth and constrain your leaves ππ
π¦ 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