---
name: "GraphQL::Language::Parser"
section: "3pm"
platform: "linux"
package: "libgraphql-perl"
version: "0.54-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/GraphQL::Language::Parser"
---

# GraphQL::Language::Parser(3pm)

GraphQL Pegex parser

## NAME

GraphQL::Language::Parser - GraphQL Pegex parser

## SYNOPSIS

```
  use GraphQL::Language::Parser qw(parse);
  my $parsed = parse(
    $source
  );
```

## DESCRIPTION

Provides both an outside-accessible point of entry into the GraphQL parser (see above), and a subclass of Pegex::Parser to parse a document into an AST usable by GraphQL.

## METHODS

### parse

```
  parse($source, $noLocation);
```

**NB** that unlike in `"Pegex::Parser"` this is a function, not an instance method. This achieves hiding of Pegex implementation details.

### format\_error

Override of parent method. Returns a GraphQL::Error.
