GraphQ...ection(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::Introspection β€” the perl manual page, but make it bestie πŸ’–

okay so this is GraphQL::Introspection, a Perl situation, living in the 3pm section of your manual (you know, the Perl module girlies πŸŽ€). It's the Perl implementation of GraphQL. Yes bestie, introspection. Looking at yourself. Main character energy fr fr πŸͺžβœ¨


✨ NAME ✨

GraphQL::Introspection β€” a Perl implementation of GraphQL. That's it, that's the name, no notes πŸ’…


🌸 SYNOPSIS 🌸

so you literally just do this and you're in:

use GraphQL::Introspection qw($QUERY);
my $schema_data = execute($schema, $QUERY);

like. that's the whole vibe. pull in $QUERY, hand it to execute with your $schema, and boom β€” $schema_data is yours 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

It provides infrastructure implementing GraphQL's introspection. That's the official tea β˜• β€” this module is the scaffolding that makes the whole "a schema can look at itself" thing happen.


πŸ‘‘ EXPORT πŸ‘‘

⭐ $QUERY

The GraphQL query to introspect the schema. This is the one you want, lowkey. It's the whole point πŸ’–

🌈 $TYPE_KIND_META_TYPE

The enum type describing kinds of type. It's the second-most-meta type here, after $TYPE_META_TYPE itself. So close to the meta-crown, but respectfully, second place πŸ‘‘πŸ₯ˆ

πŸŽ€ $DIRECTIVE_LOCATION_META_TYPE

The enum type describing directive locations. Where do directives go? This knows πŸ“

πŸ“ $ENUM_VALUE_META_TYPE

The type describing enum values. Enum value lore, contained ✨

🧚 $INPUT_VALUE_META_TYPE

The type describing input values. Inputs, but make it a type 🫢

πŸ’œ $FIELD_META_TYPE

The type describing fields. Fields, described. Slay 🌾

πŸ”₯ $DIRECTIVE_META_TYPE

The type describing directives. Directives getting their own type, iconic πŸ’…

πŸ’€ $TYPE_META_TYPE

The type describing a type. "Yo dawg..." 😭😭 yes. A type about types. It's meta. It's the meta. We love a self-referential king.

🌟 $SCHEMA_META_TYPE

The type describing the schema itself. The schema, looking at the schema. Full circle moment πŸŒ€

πŸ¦„ $SCHEMA_META_FIELD_DEF

The meta-field existing on the top query. Top-level meta-field, main character, obviously 🌈

🌸 $TYPE_META_FIELD_DEF

The meta-field existing on the top query, describing a named type. Same spot, different job β€” this one's about named types 🏷️

✨ $TYPE_NAME_META_FIELD_DEF

The meta-field existing on each object field, naming its type. Every object field gets one, and it tells you what type it is. Helpful bestie behavior fr fr 🫢


no cap: every single one of those exports is spelled exactly like that, so don't get cute with the underscores when you use them πŸ’–

and that's the page, bestie!! πŸŽ‰ this was perl v5.34.0, dated 2022-03-27 β€” Perl's own GraphQL::Introspection page, and yes it's been serving this exact meta realness since then πŸ’…βœ¨ bye ily 🫢

πŸ“¦ where this page comes from