GraphQ...rammar(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::Language::Grammar ✨

okay bestie, so this is a page from the User Contributed Perl Documentation section, and it's literally just called GraphQL::Language::Grammar β€” it's the GraphQL grammar πŸ’… that's the whole name, no notes, periodt.


πŸ¦‹ NAME πŸ¦‹

GraphQL::Language::Grammar β€” it's giving GraphQL grammar 🌸


πŸŽ€ SYNOPSIS πŸŽ€

okay so here's the whole vibe, copy it exactly bestie:

use Pegex::Parser;
use GraphQL::Language::Grammar;
use Pegex::Tree::Wrap;
use Pegex::Input;

my $parser = Pegex::Parser->new(
  grammar => GraphQL::Language::Grammar->new,
  receiver => Pegex::Tree::Wrap->new,
);
my $text = 'query q { foo(name: "hi") { id } }';
my $input = Pegex::Input->new(string => $text);
my $got = $parser->parse($input);

like. look at her go 🫢


πŸ’– DESCRIPTION πŸ’–

so basically this module is a subclass of Pegex::Grammar, except it comes preloaded with the GraphQL grammar inside it. that's it. that's the whole personality. it's iconic, it's lowkey minimal, and it works. ✨


πŸ‘‘ METHODS πŸ‘‘

🌈 make_tree

this one's an override of the method that comes from Pegex::Grammar. yes bestie, she said "not me taking that method and making it my own" β€” override energy fr fr πŸ’…


πŸŽ€ and that's the whole page!! mwah. written by the Perl Documentation crew, shipped with perl v5.34.0, dated 2022-03-27. go forth and parse, bestie πŸŒΈπŸ’–βœ¨
πŸ“¦ where this page comes from