GraphQ...e::Leaf(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::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