GraphQ...erface(3pm)
π GraphQL::Type::Interface(3pm) π
okay bestie, welcome to the GraphQL::Type::Interface page β straight out of the User Contributed Perl Documentation section of your local man pages. she's giving interface energy, she's giving abstract type realness, and honestly? iconic. π
β¨ NAME β¨
GraphQL::Type::Interface β it's a GraphQL interface type. that's it, that's the whole vibe. π¦
β¨ SYNOPSIS β¨
okay so here's literally how you'd spin one up. look at her go:
use GraphQL::Type::Interface;
my $ImplementingType;
my $InterfaceType = GraphQL::Type::Interface->new(
name => 'Interface',
fields => { field_name => { type => $scalar_type } },
resolve_type => sub {
return $ImplementingType;
},
);
no cap, that's the whole thing. you pass a name, you pass fields, and if you're feeling fancy you hand her a resolve_type coderef that returns $ImplementingType. slay. π
β¨ ATTRIBUTES β¨
she doesn't hoard all her attributes herself, bestie β she borrows them, main character delegation energy:
- she has
nameanddescriptioncourtesy ofGraphQL::Role::Namedπ - she has
fieldscourtesy ofGraphQL::Role::FieldsOutputπΈ
that's the tea. both rolled in, both ready to use.
π resolve_type π
resolve_typeβ it's optional, and it's a code-ref whose whole job is to resolve types. that's the entire description, fr fr. π«Ά
heads up: nothing here says what happens if you don't pass it β the page just says it's optional, so that's all we're claiming. don't come for me. π
and that's the page, bestie!! β¨ this little doc lives in the perl v5.34.0 era, dated 2022-03-27, and it was generated from the GraphQ...erface(3pm) man page header/footer situation β so if you're citing her, that's the tea. go build some interfaces, you absolute legend. ππ
π¦ 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