GraphQ...:Object(3pm)
π NAME π
GraphQL::Type::Object β bestie, it's giving GraphQL object type energy πβ¨
π¦ SYNOPSIS π¦
okay so first you gotta pull it in, and then you build your lil type, no cap:
use GraphQL::Type::Object;
my $interface_type;
my $implementing_type = GraphQL::Type::Object->new(
name => 'Object',
interfaces => [ $interface_type ],
fields => { field_name => { type => $scalar_type, resolve => sub { '' } }},
);
like. the way that just works. π«Ά
πΈ ATTRIBUTES πΈ
so it's got name and description coming straight from GraphQL::Role::Named, and it's got fields from GraphQL::Role::FieldsOutput. inherited slay, honestly π
π interfaces
optional bestie, it's a thunked array-ref of the interface type objects that get implemented. iykyk β¨
π is_type_of
also optional, a code-ref this time. what goes in: a value, an execution context hash-ref, and a resolve-info hash-ref. that's the vibe check right there π₯
fr fr that's the whole page. short, sweet, iconic. π
perl v5.34.0 π 2022-03-27 β mwah, that's a wrap, go forth and build your types, main character πππ¦πΈπ
π¦ 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