GraphQ...:Parser(3pm)
π GraphQL::Language::Parser β the GraphQL Pegex parser π
okay so bestie, you found the manpage for GraphQL::Language::Parser and honestly? iconic. it's from the User Contributed Perl Documentation section (that's the 3pm girlies), so grab a strawberry π and let's get into it.
β¨ SYNOPSIS β¨
like, the vibe is literally just this:
use GraphQL::Language::Parser qw(parse);
my $parsed = parse(
$source
);
that's it. that's the whole entrance exam. you pull in parse, you hand it your $source, and it hands you back a parsed thing. slay. π
πΈ DESCRIPTION πΈ
so what is this thing actually doing? two jobs, main character energy, no notes:
- it gives you an outside-accessible point of entry into the GraphQL parser β that's the
parseup there in the SYNOPSIS, hi bestie π - it's also a subclass of
Pegex::Parser, and its whole deal is parsing a document into an AST that GraphQL can actually use
so like. it parses GraphQL. into a tree. that GraphQL then eats. periodt. π
π¦ METHODS π¦
π« parse π«
parse($source, $noLocation);
NB: unlike in Pegex::Parser, this is a function, not an instance method. that's not a typo, that's on purpose β it's how the Pegex implementation details get hidden away so you never have to look at them. you're welcome. π«Ά
π« format_error π«
an override of the parent method, because we do things our own way here. it returns a GraphQL::Error. so when something goes wrong, you get a proper little error object and not just vibes. π
π SEE ALSO π
ngl the original page doesn't list any SEE ALSO refs, so this section is just me blowing you a kiss. π
and that's the whole page, bestie! this was perl v5.34.0, dated 2022-03-27, straight from the User Contributed Perl Documentation girlies. go parse something gorgeous. β¨ππ¦
π¦ 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