GraphQ...Object(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

πŸ’– GraphQL::Type::InputObject πŸ’–

okay bestie, so this is the manual page for GraphQL::Type::InputObject, and it lives in the User Contributed Perl Documentation corner of the internet (the 3pm section, iykyk). It's literally a GraphQL input object type and it is, no cap, exactly what it says on the tin. πŸŽ€


✨ NAME ✨

GraphQL::Type::InputObject β€” GraphQL input object type πŸ¦‹


🌸 SYNOPSIS 🌸

not me showing you the whole thing, here's the vibe:

use GraphQL::Type::InputObject;
my $type = GraphQL::Type::InputObject->new(
  name => 'InputObject',
  fields => { field_name => { type => $scalar_type, resolve => sub { '' } }},
);

that's it, that's the whole entrance. iconic honestly. πŸ’…


πŸ‘‘ ATTRIBUTES πŸ‘‘

bestie, it inherits its whole personality:

  • It has name and description from GraphQL::Role::Named.
  • It has fields from GraphQL::Role::FieldsInput.

like, it doesn't even have to try, the roles did all the work. main character energy fr fr. ✨


🧚 METHODS 🧚

πŸ”₯ is_valid

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

so you hand it a Perl hash-ref and it goes "yep, valid" or it doesn't. vibe check for hash-refs. πŸ’œ

πŸ”₯ uplift

Turn given Perl entity into valid value for this type if possible. Applies default values.

it's giving glow-up machine 🌈 β€” it takes your Perl entity and, if possible, turns it into a valid value for this type. And yes, it applies default values while it's at it, because it's generous like that. πŸ’–


lowkey a tiny page but every single bit of it is here, no skips, no cuts, periodt. πŸ’€

and that's the whole thing, bestie! this was perl v5.34.0, dated 2022-03-27, from the GraphQ...Object(3pm) page. go slay some input objects 🫢✨

πŸ“¦ where this page comes from